File tree Expand file tree Collapse file tree 2 files changed +38
-7
lines changed Expand file tree Collapse file tree 2 files changed +38
-7
lines changed Original file line number Diff line number Diff line change 276
276
</sv : property >
277
277
</sv : node >
278
278
</sv : node >
279
+
280
+ <sv : node sv : name =" testCopyUpdateReferrers" >
281
+ <sv : property sv : name =" jcr:primaryType" sv : type =" Name" >
282
+ <sv : value >nt:unstructured</sv : value >
283
+ </sv : property >
284
+ <sv : node sv : name =" referencedNode" >
285
+ <sv : property sv : name =" jcr:primaryType" sv : type =" Name" >
286
+ <sv : value >nt:unstructured</sv : value >
287
+ </sv : property >
288
+ <sv : property sv : name =" jcr:mixinTypes" sv : type =" Name" >
289
+ <sv : value >mix:referenceable</sv : value >
290
+ </sv : property >
291
+ <sv : property sv : name =" jcr:uuid" sv : type =" String" >
292
+ <sv : value >00000000-0000-0000-0000-000000000010</sv : value >
293
+ </sv : property >
294
+ </sv : node >
295
+ <sv : node sv : name =" srcNode" >
296
+ <sv : property sv : name =" jcr:primaryType" sv : type =" Name" >
297
+ <sv : value >nt:unstructured</sv : value >
298
+ </sv : property >
299
+ <sv : property sv : name =" reference" sv : type =" Reference" >
300
+ <sv : value >00000000-0000-0000-0000-000000000010</sv : value >
301
+ </sv : property >
302
+ </sv : node >
303
+ </sv : node >
304
+
279
305
<sv : node sv : name =" testCopyNoUpdateOnCopy" >
280
306
<sv : property sv : name =" jcr:primaryType" sv : type =" Name" >
281
307
<sv : value >nt:unstructured</sv : value >
Original file line number Diff line number Diff line change @@ -186,16 +186,21 @@ public function testCopyNoUpdateOnCopy()
186
186
$ this ->ws ->copy ($ src , $ dst );
187
187
}
188
188
189
- public function testCopyUpdateOnCopy ()
189
+ /**
190
+ * Copied nodes which reference other nodes should be shown in the referrers list of references
191
+ */
192
+ public function testCopyUpdateReferences ()
190
193
{
191
- $ src = '/tests_write_manipulation_copy/testCopyUpdateOnCopy/srcNode ' ;
192
- $ dst = '/tests_write_manipulation_copy/testCopyUpdateOnCopy/dstNode/srcNode ' ;
194
+ $ src = '/tests_write_manipulation_copy/testCopyUpdateReferrers/srcNode ' ;
195
+ $ dst = '/tests_write_manipulation_copy/testCopyUpdateReferrers/dstNode ' ;
196
+ $ ref = '/tests_write_manipulation_copy/testCopyUpdateReferrers/referencedNode ' ;
197
+
193
198
$ this ->ws ->copy ($ src , $ dst );
199
+ $ this ->session ->refresh (false );
200
+ $ node = $ this ->session ->getNode ($ ref );
201
+ $ references = $ node ->getReferences ();
194
202
195
- // make sure child node was copied
196
- $ this ->assertTrue ($ this ->session ->nodeExists ($ dst .'/srcFile ' ));
197
- // make sure things were updated
198
- $ this ->assertEquals ('123 ' , $ this ->session ->getProperty ($ dst .'/updateFile/jcr:data ' )->getValue ());
203
+ $ this ->assertCount (2 , $ references );
199
204
}
200
205
201
206
}
You can’t perform that action at this time.
0 commit comments