mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Updating tree test case to verify addition of whitelisted fields, fixes #4141
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6494 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
e58c397bc9
commit
affcdd23dc
1 changed files with 3 additions and 3 deletions
|
@ -314,9 +314,9 @@ class NumberTreeCase extends CakeTestCase {
|
|||
|
||||
$this->NumberTree->whitelist = array('name', 'parent_id');
|
||||
$this->NumberTree->save(array('NumberTree' => array('name' => 'testAddOrphan', 'parent_id' => null)));
|
||||
$result = $this->NumberTree->find(null, array('name', 'parent_id'), 'NumberTree.lft desc');
|
||||
$expected = array('NumberTree' => array('name' => 'testAddOrphan', 'parent_id' => null));
|
||||
$this->assertEqual($result, $expected);
|
||||
$result = $this->NumberTree->findByName('testAddOrphan', array('name', 'parent_id', 'lft', 'rght'));
|
||||
$expected = array('name' => 'testAddOrphan', 'parent_id' => null, 'lft' => '15', 'rght' => 16);
|
||||
$this->assertEqual($result['NumberTree'], $expected);
|
||||
$this->assertIdentical($this->NumberTree->verify(), true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue