Exemplo n.º 1
0
 public function testIterateOverAppended()
 {
     $event = $this->getMock(DomainEvent::class);
     $collection = new EventCollection();
     $collection->append($event);
     foreach ($collection as $i => $element) {
         $this->assertEquals(0, $i);
         $this->assertSame($event, $element);
     }
 }