You are here

public function ClassFinderAdapterTest::testWildcardClassmap in X Autoload 7.4

Same name and namespace in other branches
  1. 7.5 tests/src/ClassFinderAdapterTest.php \Drupal\xautoload\Tests\ClassFinderAdapterTest::testWildcardClassmap()

Test hook_registry_files_alter() wildcard replacement.

File

tests/lib/ClassFinderAdapterTest.php, line 28

Class

ClassFinderAdapterTest

Namespace

Drupal\xautoload\Tests

Code

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.');
}