Ejemplo n.º 1
0
 public function testCommitEmpty()
 {
     $identifier = EventStreamIdentifier::fromString('Foo');
     $contract = Contract::fromClass(\stdClass::class);
     $this->persistence->expects($this->never())->method('commit');
     $stream = EventStream::create($this->persistence, $contract, $identifier);
     $stream->commit();
 }
Ejemplo n.º 2
0
 /**
  * Create new (empty) stream
  *
  * @param Contract              $streamContract
  * @param EventStreamIdentifier $streamIdentifier
  *
  * @return EventStream
  */
 public function createStream(Contract $streamContract, EventStreamIdentifier $streamIdentifier)
 {
     return EventStream::create($this->persistence, $streamContract, $streamIdentifier);
 }