You are here

function ClassLoaderTest::testPrefixes in X Autoload 7.4

Same name and namespace in other branches
  1. 7.5 tests/src/ClassLoaderTest.php \Drupal\xautoload\Tests\ClassLoaderTest::testPrefixes()
  2. 7.3 tests/Drupal/xautoload/Tests/ClassLoaderTest.php \Drupal\xautoload\Tests\ClassLoaderTest::testPrefixes()

Test PEAR-like prefixes.

File

tests/lib/ClassLoaderTest.php, line 66

Class

ClassLoaderTest

Namespace

Drupal\xautoload\Tests

Code

function testPrefixes() {

  // Prepare the class finder.
  $finder = new ClassFinder();
  $finder
    ->registerPrefixDeep('ex_ample', 'test://base/lib');
  $finder
    ->registerPrefixRoot('ex_ample', 'test://base/vendor');
  $this
    ->assertCandidateOrder($finder, 'ex_ample_Sub%_Foo', array(
    'test://base/lib/Sub%/Foo.php',
    'test://base/vendor/ex/ample/Sub%/Foo.php',
  ));
}