function XAutoloadUnitTestCase::testPrefixes in X Autoload 7.5
Same name and namespace in other branches
- 7.3 lib/Drupal/xautoload/Tests/XAutoloadUnitTestCase.php \Drupal\xautoload\Tests\XAutoloadUnitTestCase::testPrefixes()
- 7.4 lib/Drupal/xautoload/Tests/XAutoloadUnitTestCase.php \Drupal\xautoload\Tests\XAutoloadUnitTestCase::testPrefixes()
File
- lib/
Drupal/ xautoload/ Tests/ XAutoloadUnitTestCase.php, line 79
Class
Namespace
Drupal\xautoload\TestsCode
function testPrefixes() {
// Prepare the class finder.
$finder = new ClassFinder();
$finder
->registerPrefixDeep('ex_ample', 'sites/all/modules/contrib/ex_ample/lib');
$finder
->registerPrefixRoot('ex_ample', 'sites/all/modules/contrib/ex_ample/vendor');
// Test class finding for 'ex_ample_Abc_Def'.
$this
->assertFinderSuggestions($finder, 'ex_ample_Abc_Def', array(
// Class finder is expected to suggest these files, in the exact order,
// until one of them is accepted.
array(
'suggestFile',
'sites/all/modules/contrib/ex_ample/lib/Abc/Def.php',
),
array(
'suggestFile',
'sites/all/modules/contrib/ex_ample/vendor/ex/ample/Abc/Def.php',
),
));
}