Ejemplo n.º 1
0
 /**
  * @expectedException ReflectionException
  */
 public function testShouldFailsOnCreateNonexistentClass()
 {
     $loader = new PsrLoader();
     $loader->registerNamespaces(array('TestLib' => $this->currentDir . 'TestLib' . DIRECTORY_SEPARATOR . 'Parent'));
     $loader->register();
     $loaders = spl_autoload_functions();
     $this->assertTrue(count($this->loaders) < count($loaders));
     $reflection = new ReflectionClass('\\TestLib\\Some\\Fake\\Classname');
     $constructor = $reflection->getConstructor();
 }
Ejemplo n.º 2
0
 /**
  * @expectedException ReflectionException
  */
 public function testShouldFailsOnCreateNonexistentClass()
 {
     $loader = new PsrLoader();
     $loader->registerNamespaces(['TestLib' => $this->baseDir . 'Parent']);
     $loader->register();
     $loaders = spl_autoload_functions();
     $this->assertTrue(count($this->loaders) < count($loaders));
     $reflection = new ReflectionClass('\\TestLib\\Some\\Fake\\Classname');
     $reflection->getConstructor();
 }