/** * @test */ public function theRelationsAreDirtyOnReAddingAtOtherPosition() { $objectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); $object1 = new \StdClass(); $object2 = new \StdClass(); $objectStorage->attach($object1); $objectStorage->attach($object2); $clonedStorage = clone $objectStorage; $objectStorage->removeAll($clonedStorage); $objectStorage->attach($object2); $objectStorage->attach($object1); $this->assertTrue($objectStorage->isRelationDirty($object1)); $this->assertTrue($objectStorage->isRelationDirty($object2)); }