Skip to content

Commit

Permalink
Updated test
Browse files Browse the repository at this point in the history
  • Loading branch information
dantleech committed Apr 12, 2015
1 parent 5eab291 commit a1c72fc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/10_Writing/CopyMethodsTest.php
Expand Up @@ -187,16 +187,23 @@ public function testCopyNoUpdateOnCopy()
}

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

$node = $this->session->getNode($ref);
$references = $node->getReferences();
$this->assertCount(1, $references);

$this->ws->copy($src, $dst);

$references = $node->getReferences();
$this->assertCount(2, $references);

$this->session->refresh(true );

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

0 comments on commit a1c72fc

Please sign in to comment.