コード例 #1
0
 /**
  * Use this method to indicate an application is published, <em>while recording the outcome</em>.
  * <p/>
  * Note that if you inject resources using {@link FixtureConfiguration#registerResource(Object)}, you may need to
  * reset them yourself if they are manipulated by the Saga in the "given" stage of the test.
  *
  * @param mixed $event the event to publish
  * @return FixtureExecutionResultInterface an object allowing you to verify the test results
  */
 public function whenPublishingA($event)
 {
     try {
         $this->fixtureExecutionResult->startRecording();
         $this->sagaManager->handle(GenericEventMessage::asEventMessage($event));
     } finally {
         //FixtureResourceParameterResolverFactory.clear();
     }
     return $this->fixtureExecutionResult;
 }
コード例 #2
0
 public function testLifeCycle_IgnoredEventDoesNotCreateInstance()
 {
     $this->manager->handle(new GenericEventMessage(new EndingEvent("xx")));
     $this->assertCount(0, $this->repositoryContents("12", MyTestSaga::class));
 }