[limb-svn] r6266 - 3.x/trunk/limb/tree/tests/cases
svn at limb-project.com
svn at limb-project.com
Thu Sep 6 12:28:31 MSD 2007
Author: pachanga
Date: 2007-09-06 12:28:31 +0400 (Thu, 06 Sep 2007)
New Revision: 6266
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6266
Modified:
3.x/trunk/limb/tree/tests/cases/lmbTreeTestBase.class.php
Log:
-- adding test with nodes having similar identifiers on different tree levels
Modified: 3.x/trunk/limb/tree/tests/cases/lmbTreeTestBase.class.php
===================================================================
--- 3.x/trunk/limb/tree/tests/cases/lmbTreeTestBase.class.php 2007-09-06 06:43:59 UTC (rev 6265)
+++ 3.x/trunk/limb/tree/tests/cases/lmbTreeTestBase.class.php 2007-09-06 08:28:31 UTC (rev 6266)
@@ -379,6 +379,26 @@
$this->assertEqual($node['id'], $node_1_1);
}
+ function testGetNodeByPathWithSameIdentifiersInTree()
+ {
+ $root_id = $this->imp->initTree();
+ $node_1 = $this->imp->createNode($root_id, array('identifier'=>'foo'));
+ $node_1_1 = $this->imp->createNode($node_1, array('identifier'=>'bar'));
+ $node_1_2 = $this->imp->createNode($node_1, array('identifier'=>'foo'));
+
+ $node = $this->imp->getNodeByPath('/');
+ $this->assertEqual($node['id'], $root_id);
+
+ $node = $this->imp->getNodeByPath('/foo');
+ $this->assertEqual($node['id'], $node_1);
+
+ $node = $this->imp->getNodeByPath('/foo/bar');
+ $this->assertEqual($node['id'], $node_1_1);
+
+ $node = $this->imp->getNodeByPath('/foo/foo');
+ $this->assertEqual($node['id'], $node_1_2);
+ }
+
function testGetPathToNodeFailed()
{
try
More information about the limb-svn
mailing list