diff --git a/tests/11_Import/ImportRepositoryContentTest.php b/tests/11_Import/ImportRepositoryContentTest.php index 0b079369..511194ad 100644 --- a/tests/11_Import/ImportRepositoryContentTest.php +++ b/tests/11_Import/ImportRepositoryContentTest.php @@ -104,7 +104,7 @@ public function testImportXMLUuidRemoveParentSession() { self::$staticSharedFixture['ie']->import('11_Import/idnode'); $session = $this->renewSession(); - $session->importXML('/container/idExample', __DIR__.'/../../fixtures/general/base.xml', ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_REMOVE_EXISTING); + $session->importXML('/test/container/idExample', __DIR__.'/../../fixtures/general/base.xml', ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_REMOVE_EXISTING); } /** @@ -115,7 +115,7 @@ public function testImportXMLUuidRemoveParentWorkspace() { self::$staticSharedFixture['ie']->import('11_Import/idnode'); $session = $this->renewSession(); - $session->getWorkspace()->importXML('/container/idExample', __DIR__.'/../../fixtures/general/base.xml', ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_REMOVE_EXISTING); + $session->getWorkspace()->importXML('/test/container/idExample', __DIR__.'/../../fixtures/general/base.xml', ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_REMOVE_EXISTING); } public function testImportXMLUuidNewSession() @@ -135,8 +135,8 @@ private function doTestImportXMLUuidNew($connect, $session) $connect->importXML('/', __DIR__.'/../../fixtures/general/base.xml', ImportUUIDBehaviorInterface::IMPORT_UUID_CREATE_NEW); // existing node did not change its uuid - $this->assertTrue($session->nodeExists('/container/idExample')); - $idExample = $session->getNode('/container/idExample'); + $this->assertTrue($session->nodeExists('/test/container/idExample')); + $idExample = $session->getNode('/test/container/idExample'); $this->assertEquals('842e61c0-09ab-42a9-87c0-308ccc90e6f4', $idExample->getIdentifier()); $this->assertTrue($session->nodeExists('/tests_general_base')); @@ -149,8 +149,8 @@ private function doTestImportXMLUuidNew($connect, $session) $session = $this->saveAndRenewSession(); // existing node did not change its uuid - $this->assertTrue($session->nodeExists('/container/idExample')); - $idExample = $session->getNode('/container/idExample'); + $this->assertTrue($session->nodeExists('/test/container/idExample')); + $idExample = $session->getNode('/test/container/idExample'); $this->assertEquals('842e61c0-09ab-42a9-87c0-308ccc90e6f4', $idExample->getIdentifier()); $this->assertTrue($session->nodeExists('/tests_general_base')); @@ -196,7 +196,7 @@ private function doTestImportXMLUuidRemoveExisting($connect, $session) $connect->importXML('/', __DIR__.'/../../fixtures/general/base.xml', ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_REMOVE_EXISTING); // existing node removed - $this->assertFalse($session->nodeExists('/container/idExample')); + $this->assertFalse($session->nodeExists('/test/container/idExample')); // the rest is the same as with empty repo $this->assertTrue($session->nodeExists('/tests_general_base')); @@ -216,7 +216,7 @@ private function doTestImportXMLUuidRemoveExisting($connect, $session) $session = $this->saveAndRenewSession(); // existing node removed - $this->assertFalse($session->nodeExists('/container/idExample')); + $this->assertFalse($session->nodeExists('/test/container/idExample')); // the rest is the same as with empty repo $this->assertTrue($session->nodeExists('/tests_general_base')); @@ -247,11 +247,11 @@ private function doTestImportXMLUuidReplaceExisting($connect, $session) $session->importXML('/', __DIR__.'/../../fixtures/general/base.xml', ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_REPLACE_EXISTING); // existing node replaced - $this->assertTrue($session->nodeExists('/container/idExample')); - $idExample = $session->getNode('/container/idExample'); + $this->assertTrue($session->nodeExists('/test/container/idExample')); + $idExample = $session->getNode('/test/container/idExample'); $this->assertEquals('nt:file', $idExample->getPrimaryNodeType()->getName()); $this->assertEquals('842e61c0-09ab-42a9-87c0-308ccc90e6f4', $idExample->getIdentifier()); - $this->assertTrue($session->nodeExists('/container/idExample/jcr:content')); + $this->assertTrue($session->nodeExists('/test/container/idExample/jcr:content')); $this->assertFalse($session->nodeExists('/tests_general_base/idExample')); @@ -259,18 +259,18 @@ private function doTestImportXMLUuidReplaceExisting($connect, $session) $this->assertTrue($session->nodeExists('/tests_general_base')); $this->assertTrue($session->nodeExists('/tests_general_base/test:namespacedNode')); - $ref = $session->getProperty('/container/idExample/jcr:content/weakreference_source1/ref1'); + $ref = $session->getProperty('/test/container/idExample/jcr:content/weakreference_source1/ref1'); $this->assertEquals(\PHPCR\PropertyType::WEAKREFERENCE, $ref->getType()); $this->assertEquals('13543fc6-1abf-4708-bfcc-e49511754b40', $ref->getString()); $session = $this->saveAndRenewSession(); // existing node replaced - $this->assertTrue($session->nodeExists('/container/idExample')); - $idExample = $session->getNode('/container/idExample'); + $this->assertTrue($session->nodeExists('/test/container/idExample')); + $idExample = $session->getNode('/test/container/idExample'); $this->assertEquals('nt:file', $idExample->getPrimaryNodeType()->getName()); $this->assertEquals('842e61c0-09ab-42a9-87c0-308ccc90e6f4', $idExample->getIdentifier()); - $this->assertTrue($session->nodeExists('/container/idExample/jcr:content')); + $this->assertTrue($session->nodeExists('/test/container/idExample/jcr:content')); $this->assertFalse($session->nodeExists('/tests_general_base/idExample')); @@ -278,7 +278,7 @@ private function doTestImportXMLUuidReplaceExisting($connect, $session) $this->assertTrue($session->nodeExists('/tests_general_base')); $this->assertTrue($session->nodeExists('/tests_general_base/test:namespacedNode')); - $ref = $session->getProperty('/container/idExample/jcr:content/weakreference_source1/ref1'); + $ref = $session->getProperty('/test/container/idExample/jcr:content/weakreference_source1/ref1'); $this->assertEquals(\PHPCR\PropertyType::WEAKREFERENCE, $ref->getType()); $this->assertEquals('13543fc6-1abf-4708-bfcc-e49511754b40', $ref->getString()); } @@ -342,8 +342,8 @@ public function testImportXMLDocument() $session->importXML('/', __DIR__.'/../../fixtures/11_Import/documentview.xml', ImportUUIDBehaviorInterface::IMPORT_UUID_CREATE_NEW); // existing node did not change its uuid - $this->assertTrue($session->nodeExists('/container/idExample')); - $idExample = $session->getNode('/container/idExample'); + $this->assertTrue($session->nodeExists('/test/container/idExample')); + $idExample = $session->getNode('/test/container/idExample'); $this->assertEquals('842e61c0-09ab-42a9-87c0-308ccc90e6f4', $idExample->getIdentifier()); $this->assertTrue($session->nodeExists('/tests_import')); @@ -359,8 +359,8 @@ public function testImportXMLDocument() $session = $this->saveAndRenewSession(); // existing node did not change its uuid - $this->assertTrue($session->nodeExists('/container/idExample')); - $idExample = $session->getNode('/container/idExample'); + $this->assertTrue($session->nodeExists('/test/container/idExample')); + $idExample = $session->getNode('/test/container/idExample'); $this->assertEquals('842e61c0-09ab-42a9-87c0-308ccc90e6f4', $idExample->getIdentifier()); $this->assertTrue($session->nodeExists('/tests_import')); @@ -379,16 +379,16 @@ public function testImportXMLDocumentSimple() self::$staticSharedFixture['ie']->import('11_Import/empty'); $session = $this->renewSession(); - $session->importXML('/', __DIR__.'/../../fixtures/11_Import/simple.xml', ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_THROW); + $session->importXML('/tests_import', __DIR__.'/../../fixtures/11_Import/simple.xml', ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_THROW); - $this->assertTrue($session->nodeExists('/data/node')); - $this->assertTrue($session->nodeExists('/data/sibling/child1')); - $this->assertEquals('Test', $session->getProperty('/data/sibling/title')->getValue()); + $this->assertTrue($session->nodeExists('/tests_import/data/node')); + $this->assertTrue($session->nodeExists('/tests_import/data/sibling/child1')); + $this->assertEquals('Test', $session->getProperty('/tests_import/data/sibling/title')->getValue()); $session = $this->saveAndRenewSession(); - $this->assertTrue($session->nodeExists('/data/node')); - $this->assertTrue($session->nodeExists('/data/sibling/child1')); - $this->assertEquals('Test', $session->getProperty('/data/sibling/title')->getValue()); + $this->assertTrue($session->nodeExists('/tests_import/data/node')); + $this->assertTrue($session->nodeExists('/tests_import/data/sibling/child1')); + $this->assertEquals('Test', $session->getProperty('/tests_import/data/sibling/title')->getValue()); } }