Skip to content

Commit a1c72fc

Browse files
committed
Updated test
1 parent 5eab291 commit a1c72fc

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/10_Writing/CopyMethodsTest.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,23 @@ public function testCopyNoUpdateOnCopy()
187187
}
188188

189189
/**
190-
* Copied nodes which reference other nodes should be shown in the referrers list of references
191-
* Single value
190+
* When a node is copied, any nodes to which it refers should show the copied node in its list of references.
192191
*/
193192
public function testCopyUpdateReferencesSingleValue()
194193
{
195194
$src = '/tests_write_manipulation_copy/testCopyUpdateReferrersSingleValue/srcNode';
196195
$dst = '/tests_write_manipulation_copy/testCopyUpdateReferrersSingleValue/dstNode';
197196
$ref = '/tests_write_manipulation_copy/testCopyUpdateReferrersSingleValue/referencedNode';
198197

198+
$node = $this->session->getNode($ref);
199+
$references = $node->getReferences();
200+
$this->assertCount(1, $references);
201+
199202
$this->ws->copy($src, $dst);
203+
204+
$references = $node->getReferences();
205+
$this->assertCount(2, $references);
206+
200207
$this->session->refresh(true );
201208

202209
$node = $this->session->getNode($ref);

0 commit comments

Comments
 (0)