Neos\Flow\Tests\Unit\Persistence\Generic\PersistenceManagerTest::removeActuallyRemovesAnObjectFromTheInternalObjectsArray PHP Метод

removeActuallyRemovesAnObjectFromTheInternalObjectsArray() публичный Метод

    public function removeActuallyRemovesAnObjectFromTheInternalObjectsArray()
    {
        $object1 = new \stdClass();
        $object2 = new \stdClass();
        $object3 = new \stdClass();
        $persistenceManager = new Generic\PersistenceManager();
        $persistenceManager->add($object1);
        $persistenceManager->add($object2);
        $persistenceManager->add($object3);
        $persistenceManager->remove($object2);
        $this->assertAttributeContains($object1, 'addedObjects', $persistenceManager);
        $this->assertAttributeNotContains($object2, 'addedObjects', $persistenceManager);
        $this->assertAttributeContains($object3, 'addedObjects', $persistenceManager);
    }