public function setUp()
{
parent::setUp();
$this->markSkippedIfNodeTypesPackageIsNotInstalled();
$this->contextFactory = $this->objectManager->get(ContextFactoryInterface::class);
$contentContext = $this->contextFactory->create(array('workspaceName' => 'live'));
$siteImportService = $this->objectManager->get(SiteImportService::class);
$siteImportService->importFromFile(__DIR__ . '/' . $this->fixtureFileName, $contentContext);
$this->persistenceManager->persistAll();
if ($this->nodeContextPath !== null) {
$this->node = $this->getNodeWithContextPath($this->nodeContextPath);
}
}
/** * @return void */ public function setUp() { parent::setUp(); $privilegeManager = $this->objectManager->get(TestingPrivilegeManager::class); $privilegeManager->setOverrideDecision(true); $liveWorkspace = $this->node->getWorkspace(); $personalWorkspace = new Workspace('user-test', $liveWorkspace); $this->objectManager->get(WorkspaceRepository::class)->add($personalWorkspace); $this->persistenceManager->persistAll(); $this->nodeInTestWorkspace = $this->getNodeWithContextPath('/sites/example/home@user-test'); }