From cae7792bf9ff049fd90b298cc30e3c1b229ad4d8 Mon Sep 17 00:00:00 2001 From: dantleech Date: Sun, 23 Mar 2014 18:03:06 +0100 Subject: [PATCH] Added root node rename test --- tests/10_Writing/MoveMethodsTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/10_Writing/MoveMethodsTest.php b/tests/10_Writing/MoveMethodsTest.php index b614e9b3..9d23751f 100644 --- a/tests/10_Writing/MoveMethodsTest.php +++ b/tests/10_Writing/MoveMethodsTest.php @@ -20,6 +20,17 @@ protected function setUp() parent::setUp(); } + public function testNodeRenameRoot() + { + $root = $this->session->getRootNode(); + $newNode = $root->addNode('foobar'); + $newNode->rename('barfoo'); + $this->session->save(); + $this->renewSession(); + $node = $this->session->getNode('/barfoo'); + $this->assertNotNull($node); + } + public function testNodeRename() { $first = $this->node->getNode('firstNode');