mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 23:49:55 +00:00
Added tests to disprove TreeBehavior can generate warning. Closes #5975.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8007 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
b5d7f182a0
commit
dcf1c1e154
1 changed files with 19 additions and 0 deletions
|
@ -338,6 +338,25 @@ class NumberTreeCase extends CakeTestCase {
|
||||||
$validTree = $this->Tree->verify();
|
$validTree = $this->Tree->verify();
|
||||||
$this->assertIdentical($validTree, true);
|
$this->assertIdentical($validTree, true);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* testAddNotIndexedByModel method
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function testAddNotIndexedByModel() {
|
||||||
|
extract($this->settings);
|
||||||
|
$this->Tree =& new $modelClass();
|
||||||
|
$this->Tree->initialize(2, 2);
|
||||||
|
|
||||||
|
$this->Tree->save(array('name' => 'testAddNotIndexed', $parentField => null));
|
||||||
|
$result = $this->Tree->find(null, array('name', $parentField), $modelClass . '.' . $leftField . ' desc');
|
||||||
|
$expected = array($modelClass => array('name' => 'testAddNotIndexed', $parentField => null));
|
||||||
|
$this->assertEqual($result, $expected);
|
||||||
|
|
||||||
|
$validTree = $this->Tree->verify();
|
||||||
|
$this->assertIdentical($validTree, true);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* testMovePromote method
|
* testMovePromote method
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue