コード例 #1
0
 /**
  * Assert that the saga published events on the EventBus in the exact sequence of the given <code>expected</code>
  * events. Events are compared comparing their type and fields using equals. Sequence number, aggregate identifier
  * (for domain events) and source (for application events) are ignored in the comparison.
  *
  * @param array $expected The sequence of events expected to be published by the Saga
  * @return FixtureExecutionResultInterface the FixtureExecutionResult for method chaining
  */
 public function expectPublishedEvents(array $expected)
 {
     $this->eventValidator->assertPublishedEvents($expected);
     return $this;
 }
コード例 #2
0
 /**
  * @expectedException \Governor\Framework\Test\GovernorAssertionError
  */
 public function testAssertPublishedEventsThrowsAssertionErrorIfEventWasPublished()
 {
     $this->testSubject->handle(new GenericEventMessage(new MyOtherEvent()));
     $this->testSubject->assertPublishedEvents();
 }