Example #1
0
 public function testGetNodeName()
 {
     $document = new \stdClass();
     $this->uow->expects($this->at(0))->method('getDocumentId')->with($document)->will($this->throwException(new \Exception()));
     $this->uow->expects($this->at(1))->method('getDocumentId')->with($document)->will($this->returnValue('/foo/bar'));
     $this->assertEquals(false, $this->extension->getNodeName($document));
     $this->assertEquals('bar', $this->extension->getNodeName($document));
 }