Example #1
0
 /**
  * @depends testAddCondition
  * @depends testAddConsequence
  */
 public function testSetArtifactOnConditionsAndConsequences()
 {
     $artifact = \Mockery::mock('Havvg\\Component\\Lifecycle\\Artifact\\ArtifactInterface');
     $condition = \Mockery::spy('Havvg\\Component\\Lifecycle\\Condition\\ConditionInterface, Havvg\\Component\\Lifecycle\\Artifact\\ArtifactAwareInterface');
     $consequence = \Mockery::spy('Havvg\\Component\\Lifecycle\\Consequence\\ConsequenceInterface, Havvg\\Component\\Lifecycle\\Artifact\\ArtifactAwareInterface');
     $event = new Event();
     $event->addCondition($condition);
     $event->addConsequence($consequence);
     $event->setArtifact($artifact);
     $condition->shouldHaveReceived('setArtifact')->once()->with($artifact);
     $consequence->shouldHaveReceived('setArtifact')->once()->with($artifact);
 }