Esempio n. 1
0
 /**
  * Non-standard Extension and Suffix
  *
  * @test
  * @access public
  * @return void
  */
 public function nonStandardExtensionAndSuffix()
 {
     // For this test we are using a non-standard file extension that Composer does *NOT* automatically include
     // for us, we have to do it manually.
     require_once __DIR__ . '/Fixtures/Bundle/Module/MyTestModule.inc.php';
     $finder = new ClassFinder();
     $finder->setRootDirectory(__DIR__ . '/Fixtures');
     $finder->setRootNamespace(__NAMESPACE__ . '\\Fixtures');
     $finder->setExtension('.inc.php');
     $this->assertSameArrayContents(['Darsyn\\ClassFinder\\Tests\\Fixtures\\Bundle\\Module\\MyTestModule'], $finder->findClasses(null, 'Module'));
     $this->assertSameArrayContents([], $finder->findClasses(null, 'Controller'));
 }