From d0f461abc56d8c6963e00767a24e683b5010b1d2 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Tue, 18 Mar 2014 22:55:51 +0100 Subject: [PATCH] Adding another test and reverting teporal change --- tests/Fixture/CategoryFixture.php | 2 +- tests/TestCase/Model/Behavior/TreeBehaviorTest.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Fixture/CategoryFixture.php b/tests/Fixture/CategoryFixture.php index 4db474df67c..05df61b1368 100644 --- a/tests/Fixture/CategoryFixture.php +++ b/tests/Fixture/CategoryFixture.php @@ -43,7 +43,7 @@ class CategoryFixture extends TestFixture { * * @var array */ - public $_records = array( + public $records = array( array('parent_id' => 0, 'name' => 'Category 1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'), array('parent_id' => 1, 'name' => 'Category 1.1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'), array('parent_id' => 1, 'name' => 'Category 1.2', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'), diff --git a/tests/TestCase/Model/Behavior/TreeBehaviorTest.php b/tests/TestCase/Model/Behavior/TreeBehaviorTest.php index 075005abc4c..076356705f7 100644 --- a/tests/TestCase/Model/Behavior/TreeBehaviorTest.php +++ b/tests/TestCase/Model/Behavior/TreeBehaviorTest.php @@ -59,6 +59,9 @@ public function testFindPath() { $nodes = $this->table->find('path', ['for' => 5]); $this->assertEquals([1, 2, 5], $nodes->extract('id')->toArray()); + + $nodes = $this->table->find('path', ['for' => 1]); + $this->assertEquals([1], $nodes->extract('id')->toArray()); } }