/**
  * @dataProvider getToStrings
  */
 public function test__toString($street, $zip, $cityname, $out)
 {
     $city = $this->getMock('JLM\\ContactBundle\\Model\\CityInterface');
     $city->expects($this->once())->method('__toString')->will($this->returnValue($zip . ' - ' . $cityname));
     $this->entity->setStreet($street);
     $this->entity->setCity($city);
     $this->assertSame($out, $this->entity->__toString());
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function getAddress()
 {
     $address = new Address();
     $address->setStreet($this->getStreet());
     $address->setCity($this->getAdministrator()->getAddress()->getCity());
     return $address;
 }