/** * @test */ public function offsetGetReturnsTheDataAssociatedWithAnObject() { $objectStorage = new Tx_Extbase_Persistence_ObjectStorage(); $object1 = new StdClass(); $object2 = new StdClass(); $objectStorage[$object1] = 'foo'; $objectStorage->attach($object2); $this->assertEquals($objectStorage->offsetGet($object1), 'foo'); $this->assertEquals($objectStorage->offsetGet($object2), NULL); }
/** * @see Tx_Extbase_Persistence_ObjectStorage::offsetGet */ public function offsetGet($object) { $this->initialize(); return parent::offsetGet($object); }