You are here

function ClassLoaderTest::testPsr4 in X Autoload 7.5

Same name and namespace in other branches
  1. 7.3 tests/Drupal/xautoload/Tests/ClassLoaderTest.php \Drupal\xautoload\Tests\ClassLoaderTest::testPsr4()
  2. 7.4 tests/lib/ClassLoaderTest.php \Drupal\xautoload\Tests\ClassLoaderTest::testPsr4()

Test PSR-4-like namespaces.

File

tests/src/ClassLoaderTest.php, line 33

Class

ClassLoaderTest

Namespace

Drupal\xautoload\Tests

Code

function testPsr4() {

  // Prepare the class finder.
  $finder = new ClassFinder();
  $finder
    ->addPsr4('Drupal\\ex_ample\\', 'test://base/lib/');
  $this
    ->assertCandidateOrder($finder, 'Drupal\\ex_ample\\Psr4_%\\Foo_Bar', array(
    'test://base/lib/Psr4_%/Foo_Bar.php',
  ));
}