Example #1
0
 public function testGetDoorDescription()
 {
     $door = $this->getMock('JLM\\ModelBundle\\Entity\\Door');
     $door->expects($this->once())->method('getType')->will($this->returnValue('Porte basculante'));
     $door->expects($this->once())->method('getLocation')->will($this->returnValue('Facade'));
     $contract = $this->getMock('JLM\\ContractBundle\\Model\\ContractInterface');
     $contract->expects($this->once())->method('getDoor')->will($this->returnValue($door));
     $this->entity->addContract($contract);
     $this->assertSame(array('Porte basculante / Facade'), $this->entity->getDoorDescription());
 }