Neos\ContentRepository\Tests\Behavior\Features\Bootstrap\NodeOperationsTrait::iMoveTheNodeIntoTheNodeWithPath PHP Method

iMoveTheNodeIntoTheNodeWithPath() public method

public iMoveTheNodeIntoTheNodeWithPath ( $action, $referenceNodePath )
    public function iMoveTheNodeIntoTheNodeWithPath($action, $referenceNodePath)
    {
        if ($this->isolated === true) {
            $this->callStepInSubProcess(__METHOD__, sprintf(' %s %s %s %s', 'string', escapeshellarg($action), 'string', escapeshellarg($referenceNodePath)));
        } else {
            $node = $this->iShouldHaveOneNode();
            $referenceNode = $node->getContext()->getNode($referenceNodePath);
            switch ($action) {
                case 'before':
                    $node->moveBefore($referenceNode);
                    break;
                case 'after':
                    $node->moveAfter($referenceNode);
                    break;
                case 'into':
                    $node->moveInto($referenceNode);
                    break;
                default:
                    throw new \InvalidArgumentException('Unknown move action "' . $action . '"');
            }
            $this->objectManager->get(\Neos\Flow\Persistence\PersistenceManagerInterface::class)->persistAll();
            $this->resetNodeInstances();
        }
    }