Skip to content

Commit 6776d95

Browse files
committed
Merge pull request #131 from phpcr/added-root-node-rename-test
Added root node rename test
2 parents bd9682c + cae7792 commit 6776d95

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/10_Writing/MoveMethodsTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ protected function setUp()
2020
parent::setUp();
2121
}
2222

23+
public function testNodeRenameRoot()
24+
{
25+
$root = $this->session->getRootNode();
26+
$newNode = $root->addNode('foobar');
27+
$newNode->rename('barfoo');
28+
$this->session->save();
29+
$this->renewSession();
30+
$node = $this->session->getNode('/barfoo');
31+
$this->assertNotNull($node);
32+
}
33+
2334
public function testNodeRename()
2435
{
2536
$first = $this->node->getNode('firstNode');

0 commit comments

Comments
 (0)