function ClassLoaderTest::testSpecialUnderscores in X Autoload 7.5
Same name and namespace in other branches
- 7.4 tests/lib/ClassLoaderTest.php \Drupal\xautoload\Tests\ClassLoaderTest::testSpecialUnderscores()
Tests PEAR-like class names beginning with underscore, or with a double underscore in between.
File
- tests/
src/ ClassLoaderTest.php, line 91
Class
Namespace
Drupal\xautoload\TestsCode
function testSpecialUnderscores() {
// Prepare the class finder.
$finder = new ClassFinder();
$finder
->registerPrefixDeep('_ex_ample', 'test://lib');
$finder
->registerPrefixRoot('_ex_ample', 'test://vendor');
// Verify that underscores are not a problem..
$this
->assertCandidateOrder($finder, '_ex_ample_Abc%_Def', array(
'test://lib/Abc%/Def.php',
'test://vendor/_ex/ample/Abc%/Def.php',
));
$this
->assertCandidateOrder($finder, '_abc_Foo%', array());
$this
->assertCandidateOrder($finder, 'abc__Foo%', array());
}