class ClassFinderAdapterTest in X Autoload 7.5
Same name and namespace in other branches
- 7.4 tests/lib/ClassFinderAdapterTest.php \Drupal\xautoload\Tests\ClassFinderAdapterTest
Hierarchy
- class \Drupal\xautoload\Tests\ClassFinderAdapterTest extends \Drupal\xautoload\Tests\PHPUnit_Framework_TestCase
Expanded class hierarchy of ClassFinderAdapterTest
File
- tests/
src/ ClassFinderAdapterTest.php, line 8
Namespace
Drupal\xautoload\TestsView source
class ClassFinderAdapterTest extends \PHPUnit_Framework_TestCase {
/**
* @var VirtualFilesystem
*/
protected $filesystem;
function setUp() {
parent::setUp();
$this->filesystem = StreamWrapper::register('test');
}
function tearDown() {
stream_wrapper_unregister('test');
parent::tearDown();
}
/**
* Test hook_registry_files_alter() wildcard replacement.
*/
public function testWildcardClassmap() {
$this->filesystem
->addClass('test://lib/xy/z.php', 'Foo\\Bar');
$this
->assertFalse(class_exists('Foo\\Bar', FALSE), 'Class Foo\\Bar must not exist yet.');
xautoload()->adapter
->addClassmapSources(array(
'test://lib/**/*.php',
));
$this
->assertTrue(class_exists('Foo\\Bar'), 'Class Foo\\Bar must exist.');
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ClassFinderAdapterTest:: |
protected | property | ||
ClassFinderAdapterTest:: |
function | |||
ClassFinderAdapterTest:: |
function | |||
ClassFinderAdapterTest:: |
public | function | Test hook_registry_files_alter() wildcard replacement. |