Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
basz committed Mar 3, 2017
1 parent 50c0b48 commit b2f0da2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/AllStreamProjectionRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use PHPUnit\Framework\TestCase;
use Prooph\Common\Event\ProophActionEventEmitter;
use Prooph\EventStore\InMemoryEventStore;
use Prooph\EventStore\Projection\InMemoryProjectionManager;
use Prooph\EventStore\Stream;
use Prooph\EventStore\StreamName;
use Prooph\StandardProjections\AllStreamProjectionRunner;
Expand Down Expand Up @@ -69,7 +70,8 @@ public function it_emits_events_for_all_streams()

$eventStore->commit();

$allStreamProjection = new AllStreamProjectionRunner($eventStore);
$projectionManager = new InMemoryProjectionManager($eventStore);
$allStreamProjection = new AllStreamProjectionRunner($projectionManager);
$allStreamProjection(false);

$this->assertTrue($eventStore->hasStream(new StreamName('$all')));
Expand Down
4 changes: 3 additions & 1 deletion tests/CategoryStreamProjectionRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use PHPUnit\Framework\TestCase;
use Prooph\Common\Event\ProophActionEventEmitter;
use Prooph\EventStore\InMemoryEventStore;
use Prooph\EventStore\Projection\InMemoryProjectionManager;
use Prooph\EventStore\Stream;
use Prooph\EventStore\StreamName;
use Prooph\StandardProjections\CategoryStreamProjectionRunner;
Expand Down Expand Up @@ -83,7 +84,8 @@ public function it_emits_events_for_all_streams()

$eventStore->commit();

$categoryStreamProjection = new CategoryStreamProjectionRunner($eventStore);
$projectionManager = new InMemoryProjectionManager($eventStore);
$categoryStreamProjection = new CategoryStreamProjectionRunner($projectionManager);
$categoryStreamProjection(false);

$this->assertTrue($eventStore->hasStream(new StreamName('$ct-foo')));
Expand Down
4 changes: 3 additions & 1 deletion tests/MessageNameStreamProjectionRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use PHPUnit\Framework\TestCase;
use Prooph\Common\Event\ProophActionEventEmitter;
use Prooph\EventStore\InMemoryEventStore;
use Prooph\EventStore\Projection\InMemoryProjectionManager;
use Prooph\EventStore\Stream;
use Prooph\EventStore\StreamName;
use Prooph\StandardProjections\MessageNameStreamProjectionRunner;
Expand Down Expand Up @@ -53,7 +54,8 @@ public function it_emits_events_for_all_streams()

$eventStore->commit();

$categoryStreamProjection = new MessageNameStreamProjectionRunner($eventStore);
$projectionManager = new InMemoryProjectionManager($eventStore);
$categoryStreamProjection = new MessageNameStreamProjectionRunner($projectionManager);
$categoryStreamProjection(false);

$this->assertTrue($eventStore->hasStream(new StreamName('$mn-event-a')));
Expand Down

0 comments on commit b2f0da2

Please sign in to comment.