Skip to content

Commit 70e7d2f

Browse files
committed
Added test for copying node from another workspace
1 parent a8aed08 commit 70e7d2f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

fixtures/general/additionalWorkspace.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,14 @@
6161
</sv:property>
6262
</sv:node>
6363
</sv:node>
64+
<sv:node sv:name="testCopyFromAnotherWorkspace">
65+
<sv:property sv:name="jcr:primaryType" sv:type="Name">
66+
<sv:value>nt:unstructured</sv:value>
67+
</sv:property>
68+
<sv:node sv:name="node">
69+
<sv:property sv:name="jcr:primaryType" sv:type="Name">
70+
<sv:value>nt:unstructured</sv:value>
71+
</sv:property>
72+
</sv:node>
73+
</sv:node>
6474
</sv:node>

tests/10_Writing/CopyMethodsTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ public function testWorkspaceCopy()
7171
$this->assertNotEquals($sfile->getPropertyValue('jcr:data'), $dfile->getPropertyValue('jcr:data'));
7272
}
7373

74+
public function testCopyFromAnotherWorkspace()
75+
{
76+
self::$staticSharedFixture['ie']->import('general/additionalWorkspace', 'additionalWorkspace');
77+
$src = '/tests_additional_workspace/testCopyNoSuchWorkspace/node';
78+
$dst = '/tests_write_manipulation_copy/testCopyFromAnotherWorkspace/foobar';
79+
80+
$this->ws->copy($src, $dst, 'testsAdditional');
81+
$node = $this->session->getNode($dest);
82+
}
83+
7484
/**
7585
* @expectedException \PHPCR\NoSuchWorkspaceException
7686
*/

0 commit comments

Comments
 (0)