Neos\Neos\Tests\Functional\Domain\NodeUriTest::hiddenNodeGetsNewUriSegmentOnMoveIfUriAlreadyExists PHP Method

hiddenNodeGetsNewUriSegmentOnMoveIfUriAlreadyExists() public method

The context used in this test therefor needs to be able to show hidden nodes. TODO: Investigate this behavior, currently it executes without problems but the result is wrong.
    public function hiddenNodeGetsNewUriSegmentOnMoveIfUriAlreadyExists()
    {
        $contextProperties = array_merge($this->node->getContext()->getProperties(), array('invisibleContentShown' => true));
        $context = $this->contextFactory->create($contextProperties);
        $homeNode = $context->getNode($this->nodeContextPath);
        $historyNode = $homeNode->getNode('about-us/history');
        // History node will be moved inside products and gets an uriPathSegment that exists there already.
        $historyNode->setProperty('uriPathSegment', 'neos');
        $historyNode->setHidden(true);
        $this->persistenceManager->persistAll();
        $historyNode->moveInto($homeNode->getNode('products'));
        $uriPathSegment = $historyNode->getProperty('uriPathSegment');
        $this->assertEquals('neos-1', $uriPathSegment);
    }