Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/10_Writing/MoveMethodsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please reload the session and then assert /barfoo exists?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

$this->renewSession();
$node = $this->session->getNode('/barfoo');
$this->assertNotNull($node);
}

public function testNodeRename()
{
$first = $this->node->getNode('firstNode');
Expand Down