ExtensionsTest.php in Autoload 7
File
src/Tests/Unit/ExtensionsTest.php
View source
<?php
namespace Drupal\autoload\Tests\Unit;
class ExtensionsTest extends AuxiliaryTest {
protected static $modules = array(
'autoload_test_extensions',
);
public static function getInfo() {
$info = parent::getInfo();
$info['name'] = 'Extensions';
$info['description'] = t('Ensure that registered file extensions available for autoloading.');
return $info;
}
public function test() {
$this
->assertExtensions(array(
'.php',
'.inc',
));
spl_autoload_extensions('.test');
$this
->assertExtensions(array(
'.php',
'.inc',
'.test',
));
$this
->assertFalse(class_exists('Drupal\\autoload_test_extensions\\PSR4'));
}
}