function XAutoloadUnitTestCase::testPrefixes in X Autoload 7.3
Same name and namespace in other branches
- 7.5 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 107  
Class
Namespace
Drupal\xautoload\TestsCode
function testPrefixes() {
  // Prepare the class finder.
  $finder = new \xautoload_ClassFinder_NamespaceOrPrefix();
  $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.
    'sites/all/modules/contrib/ex_ample/lib/Abc/Def.php',
    'sites/all/modules/contrib/ex_ample/vendor/ex/ample/Abc/Def.php',
  ));
}