/**
  * @test
  * @covers ::push
  */
 public function it_should_immediately_write_events_to_eventstore()
 {
     $expectedEvents = [new WritableEvent(new UUID(), '123', [])];
     $this->eventstore->shouldReceive('writeToStream')->with('streamUri', m::type(WritableEventCollection::class));
     $this->transaction->push('streamUri', $expectedEvents);
 }
 /**
  * @test
  * @covers ::push
  * @expectedException \PhpInPractice\Matters\Aggregate\Transaction\TransactionLimitedToASingleStreamException
  */
 public function it_should_throw_exception_when_pushing_events_from_multiple_streams()
 {
     $expectedEvents = [new WritableEvent(new UUID(), '123', [])];
     $this->transaction->push('streamUri', $expectedEvents);
     $this->transaction->push('streamUri2', $expectedEvents);
 }