Skip to content

Commit

Permalink
Agging another test for a tree with another root
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Mar 29, 2014
1 parent d0f461a commit acf293b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/Fixture/NumberTreeFixture.php
Expand Up @@ -117,6 +117,13 @@ class NumberTreeFixture extends TestFixture {
'parent_id' => '6',
'lft' => '17',
'rght' => '18'
),
array(
'id' => '11',
'name' => 'alien hardware',
'parent_id' => null,
'lft' => '21',
'rght' => '21'
)
);

Expand Down
4 changes: 4 additions & 0 deletions tests/TestCase/Model/Behavior/TreeBehaviorTest.php
Expand Up @@ -62,6 +62,10 @@ public function testFindPath() {

$nodes = $this->table->find('path', ['for' => 1]);
$this->assertEquals([1], $nodes->extract('id')->toArray());

$nodes = $this->table->find('path', ['for' => 11]);
$this->assertEquals([11], $nodes->extract('id')->toArray());
}


}

0 comments on commit acf293b

Please sign in to comment.