Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.

Commit d268432

Browse files
Minor SimpleCommandBus test improvement.
- Renamed method to be more accurate - Removed unneeded execute call
1 parent 27c54cf commit d268432

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tests/CommandBus/SimpleCommandBusTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,10 @@ public function itExecutesAMessage()
4747
* @test
4848
* @expectedException \HelloFresh\Engine\CommandBus\Exception\MissingHandlerException
4949
*/
50-
public function itLosesMessageWhenThereIsNoHandlers()
50+
public function itFailsWhenThereIsNoHandlers()
5151
{
5252
$command = new TestCommand("hey");
5353
$this->commandBus->execute($command);
54-
55-
$handler = new TestHandler();
56-
$this->assertSame(0, $handler->getCounter());
5754
}
5855

5956
/**
@@ -66,7 +63,6 @@ public function itFailsWhenHaveInvalidSubscriber()
6663
$handler = new TestHandler();
6764

6865
$this->locator->addHandler($command, $handler);
69-
$this->commandBus->execute($command);
7066
}
7167

7268
/**

0 commit comments

Comments
 (0)