Пример #1
0
 /**
  * Test add postalCode in zone
  *
  * @dataProvider dataAddAnyInZone
  */
 public function testAddPostalCodeInZone($exists, $persist, $flush)
 {
     $this->objectManager->expects($persist)->method('persist')->with($this->isInstanceOf('Elcodi\\Component\\Geo\\Entity\\Interfaces\\ZonePostalCodeMemberInterface'));
     $this->objectManager->expects($flush)->method('flush')->with($this->isInstanceOf('Elcodi\\Component\\Geo\\Entity\\Interfaces\\ZonePostalCodeMemberInterface'));
     $this->zoneMatcher->expects($this->any())->method('isPostalCodeContainedInZone')->will($this->returnValue($exists));
     $postalCode = $this->getMock('Elcodi\\Component\\Geo\\Entity\\Interfaces\\PostalCodeInterface');
     $zone = $this->getMock('Elcodi\\Component\\Geo\\Entity\\Interfaces\\ZoneInterface');
     $this->zoneManager->addPostalCodeToZone($zone, $postalCode);
 }