コード例 #1
0
 /**
  * @param AttributeModel $attribute
  * @depends testUpdate
  */
 public function testDelete(AttributeModel $attribute)
 {
     $event = new AttributeDeleteEvent($attribute->getId());
     $action = new Attribute();
     $action->delete($event, null, $this->getMockEventDispatcher());
     $deletedAttribute = $event->getAttribute();
     $this->assertInstanceOf('Thelia\\Model\\Attribute', $deletedAttribute);
     $this->assertTrue($deletedAttribute->isDeleted());
 }
コード例 #2
0
 /**
  * @depends testUpdate
  */
 public function testDelete(AttributeModel $attribute)
 {
     $event = new AttributeDeleteEvent($attribute->getId());
     $event->setDispatcher($this->getMock("Symfony\\Component\\EventDispatcher\\EventDispatcherInterface"));
     $action = new Attribute();
     $action->delete($event);
     $deletedAttribute = $event->getAttribute();
     $this->assertInstanceOf('Thelia\\Model\\Attribute', $deletedAttribute);
     $this->assertTrue($deletedAttribute->isDeleted());
 }