public function testSet()
 {
     $obj = new Base();
     $obj->setId(500);
     $this->data[1] = $obj;
     $this->arrayCollection->offsetSet(1, $obj);
     $this->assertEquals($this->data, $this->arrayCollection->toArray());
     $this->data[50] = $obj;
     $this->arrayCollection->offsetSet(50, $obj);
     $this->assertEquals($this->data, $this->arrayCollection->toArray());
 }
Example #2
0
 public function testSetId()
 {
     $this->object->setId(1);
     $this->assertEquals(1, $this->object->getId());
 }