Skip to content

Commit

Permalink
Merge pull request #19 from SmoothPhp/test/test-initialised-event-queue
Browse files Browse the repository at this point in the history
[Event Bus Test] Create test to check initial queue state
  • Loading branch information
mrsimonbennett committed Dec 4, 2015
2 parents 66b3f9d + d44965f commit a7b1a19
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/EventBus/SimpleEventBusTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ public function test_subscribing_to_event_bus()
$eventBus->publish(new DomainEventStream([new \SmoothPhp\Domain\DomainMessage('',0,new Metadata(),null,new DateTime())]));
$this->assertEquals(1,$listener->runCount);
}

/**
* Should not throw exception!
*/
public function test_queue_automatically_initialised()
{
$bus = new SimpleEventBus();

$stream = new DomainEventStream([]);
$bus->publish($stream);
}
}

class EventBusListener implements EventListener
Expand Down

0 comments on commit a7b1a19

Please sign in to comment.