Skip to content

Commit fb0faeb

Browse files
committed
Merge pull request #144 from phpcr/rename-not-change-position
Ensure that rename does not change the position of a node among its siblings
2 parents f1a0b4c + 11b11c7 commit fb0faeb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/10_Writing/MoveMethodsTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public function testNodeRename()
4343
$session = $this->saveAndRenewSession();
4444

4545
$this->assertTrue($session->nodeExists('/tests_write_manipulation_move/testNodeRename/otherName'));
46+
47+
$parent = $session->getNode('/tests_write_manipulation_move/testNodeRename');
48+
$this->assertEquals(array('otherName', 'secondNode'), (array) $parent->getNodeNames(), 'Rename may not change position of nodes');
4649
}
4750

4851
public function testSessionMove()

0 commit comments

Comments
 (0)