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:
renan.saddam 2009-01-21 01:17:51 +00:00
parent b5d7f182a0
commit dcf1c1e154

View file

@ -338,6 +338,25 @@ class NumberTreeCase extends CakeTestCase {
$validTree = $this->Tree->verify();
$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
*