public function testLoadPartiallyWithEndWithSnapshotEvent() { $this->testSubject->appendEvents("test", $this->aggregate1->getUncommittedEvents()); $this->aggregate1->commitEvents(); $this->testSubject->appendSnapshotEvent("test", $this->aggregate1->createSnapshotEvent()); $this->aggregate1->changeState(); $this->testSubject->appendEvents("test", $this->aggregate1->getUncommittedEvents()); $this->aggregate1->commitEvents(); $actualEventStream = $this->testSubject->readEventsWithinScn("test", $this->aggregate1->getIdentifier(), 3, 6); $domainEvents = []; while ($actualEventStream->hasNext()) { $domainEvents[] = $actualEventStream->next(); } $this->assertCount(4, $domainEvents); $this->assertEquals(3, $domainEvents[0]->getScn()); }