Example #1
0
 /**
  * Tests classToPath method with substitution
  *
  * @return void
  */
 public function testClassToPathWithSubstitution()
 {
     $classLoader = new ClassLoader();
     $classLoader->addSubstitution("^App", "");
     $class = "App\\NS\\Class";
     $expected = join(DIRECTORY_SEPARATOR, ["NS", "Class.php"]);
     $path = $classLoader->classToPath($class);
     $this->assertSame($expected, $path);
 }