Example #1
0
 public function testLoaderInitialisation()
 {
     //Call the bootstrap, it returns the loader
     $this->loader = (include __DIR__ . '/../../src/bootstrap.php');
     //Check if the loader implements the good interface
     $this->assertInstanceOf('\\Teknoo\\States\\Loader\\LoaderInterface', $this->loader);
     $this->assertInstanceOf('\\Closure', $this->loader->getFinderFactory());
     $finder = $this->loader->getFinderFactory()->__invoke('class', 'path');
     $this->assertInstanceOf('\\Teknoo\\States\\Loader\\FinderInterface', $finder);
     if ($finder instanceof Loader\FinderInterface) {
         $this->assertEquals('class', $finder->getStatedClassName());
     }
 }