/** * @param AttributeAvModel $attributeAv * @depends testUpdate */ public function testDelete(AttributeAvModel $attributeAv) { $event = new AttributeAvDeleteEvent($attributeAv->getId()); $action = new AttributeAv(); $action->delete($event, null, $this->getMockEventDispatcher()); $deletedAttributeAv = $event->getAttributeAv(); $this->assertInstanceOf('Thelia\\Model\\AttributeAv', $deletedAttributeAv); $this->assertTrue($deletedAttributeAv->isDeleted()); }
/** * @depends testUpdate */ public function testDelete(AttributeAvModel $attributeAv) { $event = new AttributeAvDeleteEvent($attributeAv->getId()); $event->setDispatcher($this->getMock("Symfony\\Component\\EventDispatcher\\EventDispatcherInterface")); $action = new AttributeAv(); $action->delete($event); $deletedAttributeAv = $event->getAttributeAv(); $this->assertInstanceOf('Thelia\\Model\\AttributeAv', $deletedAttributeAv); $this->assertTrue($deletedAttributeAv->isDeleted()); }