@@ -71,18 +71,20 @@ public function testWorkspaceCopy()
7171 $ this ->assertNotEquals ($ sfile ->getPropertyValue ('jcr:data ' ), $ dfile ->getPropertyValue ('jcr:data ' ));
7272 }
7373
74- public function testCopyFromAnotherWorkspace ()
74+ public function testWorkspaceCopyOther ()
7575 {
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 );
76+ self ::$ staticSharedFixture ['ie ' ]->import ('general/additionalWorkspace ' , 'testsAdditional ' );
77+ $ src = '/tests_additional_workspace/testWorkspaceCopyOther/node ' ;
78+ $ dst = '/tests_write_manipulation_copy/testWorkspaceCopyOther/foobar ' ;
79+
80+ $ this ->ws ->copy ($ src , $ dst , self ::$ loader ->getOtherWorkspaceName ());
81+ $ node = $ this ->session ->getNode ($ dst );
82+ $ this ->assertTrue ($ node ->hasProperty ('x ' ));
83+ $ this ->assertEquals ('y ' , $ node ->getPropertyValue ('x ' ));
8284 }
8385
8486 /**
85- * @expectedException \PHPCR\NoSuchWorkspaceException
87+ * @expectedException \PHPCR\NoSuchWorkspaceException
8688 */
8789 public function testCopyNoSuchWorkspace ()
8890 {
@@ -91,21 +93,16 @@ public function testCopyNoSuchWorkspace()
9193 $ this ->ws ->copy ($ src , $ dst , 'inexistentworkspace ' );
9294 }
9395
94- public function testWorkspaceCopyBackend ()
95- {
96- $ this ->markTestIncomplete ('TODO: just do ' );
97- }
98-
9996 /**
100- * @expectedException \PHPCR\RepositoryException
97+ * @expectedException \PHPCR\RepositoryException
10198 */
10299 public function testCopyRelativePaths ()
103100 {
104101 $ this ->ws ->copy ('foo/moo ' , 'bar/mar ' );
105102 }
106103
107104 /**
108- * @expectedException \PHPCR\RepositoryException
105+ * @expectedException \PHPCR\RepositoryException
109106 */
110107 public function testCopyInvalidDstPath ()
111108 {
@@ -115,7 +112,7 @@ public function testCopyInvalidDstPath()
115112 }
116113
117114 /**
118- * @expectedException \PHPCR\RepositoryException
115+ * @expectedException \PHPCR\RepositoryException
119116 */
120117 public function testCopyProperty ()
121118 {
@@ -125,7 +122,7 @@ public function testCopyProperty()
125122 }
126123
127124 /**
128- * @expectedException \PHPCR\PathNotFoundException
125+ * @expectedException \PHPCR\PathNotFoundException
129126 */
130127 public function testCopySrcNotFound ()
131128 {
@@ -135,7 +132,7 @@ public function testCopySrcNotFound()
135132 }
136133
137134 /**
138- * @expectedException \PHPCR\PathNotFoundException
135+ * @expectedException \PHPCR\PathNotFoundException
139136 */
140137 public function testCopyDstParentNotFound ()
141138 {
@@ -147,7 +144,7 @@ public function testCopyDstParentNotFound()
147144 /**
148145 * Verifies that there is no update-on-copy if the target node already exists
149146 *
150- * @expectedException \PHPCR\ItemExistsException
147+ * @expectedException \PHPCR\ItemExistsException
151148 */
152149 public function testCopyNoUpdateOnCopy ()
153150 {
0 commit comments