public function testOffsetSet() { $entity0 =& $this->coll->getObjects()[0]; $this->coll->offsetSet(0, 'foo'); $this->assertSame($this->coll->getObjects()[0], $entity0); $entity2 = $this->testEntities[2]; $this->coll->offsetSet(0, $entity2); $this->assertSame($this->coll->offsetGet(0), $entity2); }