Ejemplo n.º 1
0
 public function testGetAllClassNamesThrowsException()
 {
     $this->setExpectedException('RuntimeException');
     $driver = $this->getMock('Metadata\\Driver\\DriverInterface');
     $driver->expects($this->never())->method('getAllClassNames');
     $chain = new DriverChain(array($driver));
     $chain->getAllClassNames();
 }
Ejemplo n.º 2
0
 public function testLoadMetadataForClassReturnsNullWhenNoMetadataIsFound()
 {
     $driver = new DriverChain(array());
     $this->assertNull($driver->loadMetadataForClass(new \ReflectionClass('\\stdClass')));
     $driver = $this->getMock('Metadata\\Driver\\DriverInterface');
     $driver->expects($this->once())->method('loadMetadataForClass')->will($this->returnValue(null));
     $driverChain = new DriverChain(array($driver));
     $this->assertNull($driver->loadMetadataForClass(new \ReflectionClass('\\stdClass')));
 }