Skip to content

Commit

Permalink
Merge pull request #1 from codeliner/tests
Browse files Browse the repository at this point in the history
Align test to reflect testing purpose
  • Loading branch information
prolic committed Aug 31, 2015
2 parents f4adf0a + c0b5ed8 commit bc768f0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/TransactionManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,6 @@ public function it_returns_early_if_command_was_null_when_handling_events()
//Step 1: Create null command
$command = null;

$causationId = Uuid::uuid4();

$initializeActionEvent = $this->prophesize(ActionEvent::class);

$initializeActionEvent->getParam(CommandBus::EVENT_PARAM_MESSAGE)->willReturn($command);
Expand All @@ -283,9 +281,8 @@ public function it_returns_early_if_command_was_null_when_handling_events()
$transactionManager->onInitialize($initializeActionEvent->reveal());

$recordedEvent = $this->prophesize(Message::class);
$recordedEventCopy1 = $this->prophesize(Message::class);

$recordedEvent->withAddedMetadata('causation_id', $causationId->toString())->willReturn($recordedEventCopy1->reveal());
$recordedEvent->withAddedMetadata('causation_id', Argument::any())->shouldNotBeCalled();

$stream = new Stream(new StreamName('event_stream'), [$recordedEvent->reveal()]);

Expand Down

0 comments on commit bc768f0

Please sign in to comment.