Exemplo n.º 1
0
 /**
  * @depends testRemoveCountry
  */
 public function testDelete(AreaModel $area)
 {
     $event = new AreaDeleteEvent($area->getId());
     $event->setDispatcher($this->getMock("Symfony\\Component\\EventDispatcher\\EventDispatcherInterface"));
     $areaAction = new Area();
     $areaAction->delete($event);
     $deletedArea = $event->getArea();
     $this->assertInstanceOf('Thelia\\Model\\Area', $deletedArea);
     $this->assertTrue($deletedArea->isDeleted());
 }
Exemplo n.º 2
0
 /**
  * @param AreaModel $area
  * @depends testRemoveCountry
  */
 public function testDelete(AreaModel $area)
 {
     $event = new AreaDeleteEvent($area->getId());
     $areaAction = new Area();
     $areaAction->delete($event, null, $this->getMockEventDispatcher());
     $deletedArea = $event->getArea();
     $this->assertInstanceOf('Thelia\\Model\\Area', $deletedArea);
     $this->assertTrue($deletedArea->isDeleted());
 }