/** * @expectedException \Governor\Framework\Test\GovernorAssertionError */ public function testMatchWithUnexpectedNullValue() { \Phake::when($this->commandBus)->getDispatchedCommands(\Phake::anyParameters())->thenReturn($this->listOfOneCommandMessage(new SomeCommand(null))); $this->testSubject->assertDispatchedEqualTo(array(new SomeCommand("test"))); }
/** * Asserts that the sagas did not dispatch any commands. Only commands as a result of the event in the "when" stage * of ths fixture are recorded. * * @return FixtureExecutionResultInterface the FixtureExecutionResult for method chaining */ public function expectNoDispatchedCommands() { $this->commandValidator->assertDispatchedMatching(Matchers::noCommands()); return $this; }