public function setUp()
{
parent::setUp();
$workspaceRepository = $this->objectManager->get(\Neos\ContentRepository\Domain\Repository\WorkspaceRepository::class);
$workspaceRepository->add(new Workspace('live'));
$this->persistenceManager->persistAll();
$this->contextFactory = $this->objectManager->get(\Neos\ContentRepository\Domain\Service\ContextFactoryInterface::class);
$this->context = $this->contextFactory->create(array('workspaceName' => 'live'));
$siteImportService = $this->objectManager->get(\Neos\Neos\Domain\Service\SiteImportService::class);
$siteImportService->importFromFile(__DIR__ . '/Fixtures/SortableNodes.xml', $this->context);
$this->persistenceManager->persistAll();
$this->persistenceManager->clearState();
$this->inject($this->contextFactory, 'contextInstances', array());
// The context is not important here, just a quick way to get a (live) workspace
// $context = $this->contextFactory->create();
$this->nodeDataRepository = $this->objectManager->get(\Neos\ContentRepository\Domain\Repository\NodeDataRepository::class);
}