Neos\ContentRepository\Tests\Functional\Domain\NodesTest::removedNodesAreNotCountedAsChildNodes PHP Метод

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

    public function removedNodesAreNotCountedAsChildNodes()
    {
        $rootNode = $this->context->getRootNode();
        $rootNode->createNode('foo');
        $rootNode->getNode('foo')->remove();
        $this->assertFalse($rootNode->hasChildNodes(), 'First check.');
        $rootNode->createNode('bar');
        $this->persistenceManager->persistAll();
        $this->assertTrue($rootNode->hasChildNodes(), 'Second check.');
        $context = $this->contextFactory->create(['workspaceName' => 'user-admin']);
        $rootNode = $context->getRootNode();
        $rootNode->getNode('bar')->remove();
        $this->persistenceManager->persistAll();
        $this->assertFalse($rootNode->hasChildNodes(), 'Third check.');
    }
NodesTest