|
|
@@ -64,7 +64,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testInitialize() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$result = $this->Tree->find('count');
|
|
|
@@ -82,7 +81,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testDetectInvalidLeft() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$result = $this->Tree->findByName('1.1');
|
|
|
@@ -93,7 +91,7 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
$this->Tree->create();
|
|
|
$this->Tree->save($save);
|
|
|
$result = $this->Tree->verify();
|
|
|
- $this->assertNotSame($result, true);
|
|
|
+ $this->assertNotSame(true, $result);
|
|
|
|
|
|
$result = $this->Tree->recover();
|
|
|
$this->assertTrue($result);
|
|
|
@@ -110,7 +108,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testDetectInvalidRight() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$result = $this->Tree->findByName('1.1');
|
|
|
@@ -121,7 +118,7 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
$this->Tree->create();
|
|
|
$this->Tree->save($save);
|
|
|
$result = $this->Tree->verify();
|
|
|
- $this->assertNotSame($result, true);
|
|
|
+ $this->assertNotSame(true, $result);
|
|
|
|
|
|
$result = $this->Tree->recover();
|
|
|
$this->assertTrue($result);
|
|
|
@@ -138,7 +135,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testDetectInvalidParent() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$result = $this->Tree->findByName('1.1');
|
|
|
@@ -147,7 +143,7 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
$this->Tree->updateAll(array($parentField => null), array('id' => $result[$modelClass]['id']));
|
|
|
|
|
|
$result = $this->Tree->verify();
|
|
|
- $this->assertNotSame($result, true);
|
|
|
+ $this->assertNotSame(true, $result);
|
|
|
|
|
|
$result = $this->Tree->recover();
|
|
|
$this->assertTrue($result);
|
|
|
@@ -164,14 +160,13 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testDetectNoneExistentParent() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$result = $this->Tree->findByName('1.1');
|
|
|
$this->Tree->updateAll(array($parentField => 999999), array('id' => $result[$modelClass]['id']));
|
|
|
|
|
|
$result = $this->Tree->verify();
|
|
|
- $this->assertNotSame($result, true);
|
|
|
+ $this->assertNotSame(true, $result);
|
|
|
|
|
|
$result = $this->Tree->recover('MPTT');
|
|
|
$this->assertTrue($result);
|
|
|
@@ -188,7 +183,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testRecoverUsingParentMode() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->Behaviors->disable('Tree');
|
|
|
|
|
|
$this->Tree->create();
|
|
|
@@ -212,7 +206,7 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
$this->Tree->Behaviors->enable('Tree');
|
|
|
|
|
|
$result = $this->Tree->verify();
|
|
|
- $this->assertNotSame($result, true);
|
|
|
+ $this->assertNotSame(true, $result);
|
|
|
|
|
|
$result = $this->Tree->recover();
|
|
|
$this->assertTrue($result);
|
|
|
@@ -244,7 +238,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testRecoverUsingParentModeAndDelete() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->Behaviors->disable('Tree');
|
|
|
|
|
|
$this->Tree->create();
|
|
|
@@ -280,7 +273,7 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
))));
|
|
|
|
|
|
$result = $this->Tree->verify();
|
|
|
- $this->assertNotSame($result, true);
|
|
|
+ $this->assertNotSame(true, $result);
|
|
|
|
|
|
$count = $this->Tree->find('count');
|
|
|
$this->assertEquals(6, $count);
|
|
|
@@ -318,14 +311,13 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testRecoverFromMissingParent() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$result = $this->Tree->findByName('1.1');
|
|
|
$this->Tree->updateAll(array($parentField => 999999), array('id' => $result[$modelClass]['id']));
|
|
|
|
|
|
$result = $this->Tree->verify();
|
|
|
- $this->assertNotSame($result, true);
|
|
|
+ $this->assertNotSame(true, $result);
|
|
|
|
|
|
$result = $this->Tree->recover();
|
|
|
$this->assertTrue($result);
|
|
|
@@ -342,13 +334,12 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testDetectInvalidParents() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$this->Tree->updateAll(array($parentField => null));
|
|
|
|
|
|
$result = $this->Tree->verify();
|
|
|
- $this->assertNotSame($result, true);
|
|
|
+ $this->assertNotSame(true, $result);
|
|
|
|
|
|
$result = $this->Tree->recover();
|
|
|
$this->assertTrue($result);
|
|
|
@@ -365,13 +356,12 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testDetectInvalidLftsRghts() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$this->Tree->updateAll(array($leftField => 0, $rightField => 0));
|
|
|
|
|
|
$result = $this->Tree->verify();
|
|
|
- $this->assertNotSame($result, true);
|
|
|
+ $this->assertNotSame(true, $result);
|
|
|
|
|
|
$this->Tree->recover();
|
|
|
|
|
|
@@ -387,7 +377,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testDetectEqualLftsRghts() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(1, 3);
|
|
|
|
|
|
$result = $this->Tree->findByName('1.1');
|
|
|
@@ -398,7 +387,7 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
array($rightField . ' >' => $result[$modelClass][$leftField]));
|
|
|
|
|
|
$result = $this->Tree->verify();
|
|
|
- $this->assertNotSame($result, true);
|
|
|
+ $this->assertNotSame(true, $result);
|
|
|
|
|
|
$result = $this->Tree->recover();
|
|
|
$this->assertTrue($result);
|
|
|
@@ -415,7 +404,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testAddOrphan() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$this->Tree->create();
|
|
|
@@ -436,7 +424,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testAddMiddle() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$data = $this->Tree->find('first', array('fields' => array('id'), 'conditions' => array($modelClass . '.name' => '1.1')));
|
|
|
@@ -468,7 +455,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testAddWithPreSpecifiedId() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$data = $this->Tree->find('first', array(
|
|
|
@@ -499,7 +485,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testAddInvalid() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
$this->Tree->id = null;
|
|
|
|
|
|
@@ -525,7 +510,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testAddNotIndexedByModel() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$this->Tree->create();
|
|
|
@@ -546,7 +530,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMovePromote() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
$this->Tree->id = null;
|
|
|
|
|
|
@@ -573,7 +556,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveWithWhitelist() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
$this->Tree->id = null;
|
|
|
|
|
|
@@ -601,7 +583,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testInsertWithWhitelist() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$this->Tree->whitelist = array('name', $parentField);
|
|
|
@@ -621,7 +602,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveBefore() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
$this->Tree->id = null;
|
|
|
|
|
|
@@ -650,7 +630,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveAfter() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
$this->Tree->id = null;
|
|
|
|
|
|
@@ -679,7 +658,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveDemoteInvalid() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
$this->Tree->id = null;
|
|
|
|
|
|
@@ -712,7 +690,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveInvalid() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
$this->Tree->id = null;
|
|
|
|
|
|
@@ -737,7 +714,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveSelfInvalid() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
$this->Tree->id = null;
|
|
|
|
|
|
@@ -763,7 +739,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveUpSuccess() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$data = $this->Tree->find('first', array('fields' => array('id'), 'conditions' => array($modelClass . '.name' => '1.2')));
|
|
|
@@ -785,7 +760,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveUpFail() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$data = $this->Tree->find('first', array('conditions' => array($modelClass . '.name' => '1.1')));
|
|
|
@@ -808,7 +782,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveUp2() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(1, 10);
|
|
|
|
|
|
$data = $this->Tree->find('first', array('fields' => array('id'), 'conditions' => array($modelClass . '.name' => '1.5')));
|
|
|
@@ -839,7 +812,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveUpFirst() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(1, 10);
|
|
|
|
|
|
$data = $this->Tree->find('first', array('fields' => array('id'), 'conditions' => array($modelClass . '.name' => '1.5')));
|
|
|
@@ -870,7 +842,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveDownSuccess() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$data = $this->Tree->find('first', array('fields' => array('id'), 'conditions' => array($modelClass . '.name' => '1.1')));
|
|
|
@@ -892,7 +863,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveDownFail() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$data = $this->Tree->find('first', array('conditions' => array($modelClass . '.name' => '1.2')));
|
|
|
@@ -914,7 +884,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveDownLast() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(1, 10);
|
|
|
|
|
|
$data = $this->Tree->find('first', array('fields' => array('id'), 'conditions' => array($modelClass . '.name' => '1.5')));
|
|
|
@@ -945,7 +914,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveDown2() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(1, 10);
|
|
|
|
|
|
$data = $this->Tree->find('first', array('fields' => array('id'), 'conditions' => array($modelClass . '.name' => '1.5')));
|
|
|
@@ -976,7 +944,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testSaveNoMove() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(1, 10);
|
|
|
|
|
|
$data = $this->Tree->find('first', array('fields' => array('id'), 'conditions' => array($modelClass . '.name' => '1.5')));
|
|
|
@@ -1007,7 +974,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testMoveToRootAndMoveUp() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(1, 1);
|
|
|
$data = $this->Tree->find('first', array('fields' => array('id'), 'conditions' => array($modelClass . '.name' => '1.1')));
|
|
|
$this->Tree->id = $data[$modelClass]['id'];
|
|
|
@@ -1032,7 +998,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testDelete() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$initialCount = $this->Tree->find('count');
|
|
|
@@ -1068,7 +1033,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testDeleteDoesNotExist() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
$this->Tree->delete(99999);
|
|
|
}
|
|
|
@@ -1081,7 +1045,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testRemove() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
$initialCount = $this->Tree->find('count');
|
|
|
$result = $this->Tree->findByName('1.1');
|
|
|
@@ -1114,7 +1077,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testRemoveLastTopParent() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$initialCount = $this->Tree->find('count');
|
|
|
@@ -1148,7 +1110,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testRemoveNoChildren() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
$initialCount = $this->Tree->find('count');
|
|
|
|
|
|
@@ -1183,7 +1144,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testRemoveAndDelete() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$initialCount = $this->Tree->find('count');
|
|
|
@@ -1218,7 +1178,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testRemoveAndDeleteNoChildren() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
$initialCount = $this->Tree->find('count');
|
|
|
|
|
|
@@ -1251,7 +1210,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testChildren() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$data = $this->Tree->find('first', array('conditions' => array($modelClass . '.name' => '1. Root')));
|
|
|
@@ -1282,7 +1240,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testCountChildren() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$data = $this->Tree->find('first', array('conditions' => array($modelClass . '.name' => '1. Root')));
|
|
|
@@ -1308,7 +1265,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testGetParentNode() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$data = $this->Tree->find('first', array('conditions' => array($modelClass . '.name' => '1.2.2')));
|
|
|
@@ -1327,7 +1283,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testGetPath() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$data = $this->Tree->find('first', array('conditions' => array($modelClass . '.name' => '1.2.2')));
|
|
|
@@ -1348,7 +1303,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testNoAmbiguousColumn() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->bindModel(array('belongsTo' => array('Dummy' =>
|
|
|
array('className' => $modelClass, 'foreignKey' => $parentField, 'conditions' => array('Dummy.id' => null)))), false);
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
@@ -1381,7 +1335,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testReorderTree() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(3, 3);
|
|
|
$nodes = $this->Tree->find('list', array('order' => $leftField));
|
|
|
|
|
|
@@ -1413,7 +1366,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testReorderBigTreeWithQueryCaching() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 10);
|
|
|
|
|
|
$original = $this->Tree->cacheQueries;
|
|
|
@@ -1431,7 +1383,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testGenerateTreeListWithSelfJoin() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->bindModel(array('belongsTo' => array('Dummy' =>
|
|
|
array('className' => $modelClass, 'foreignKey' => $parentField, 'conditions' => array('Dummy.id' => null)))), false);
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
@@ -1449,7 +1400,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testGenerateTreeListFormatting() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(2, 2);
|
|
|
|
|
|
$result = $this->Tree->generateTreeList(
|
|
|
@@ -1470,7 +1420,6 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|
|
public function testArraySyntax() {
|
|
|
extract($this->settings);
|
|
|
$this->Tree = new $modelClass();
|
|
|
- $this->Tree->order = null;
|
|
|
$this->Tree->initialize(3, 3);
|
|
|
$this->assertSame($this->Tree->childCount(2), $this->Tree->childCount(array('id' => 2)));
|
|
|
$this->assertSame($this->Tree->getParentNode(2), $this->Tree->getParentNode(array('id' => 2)));
|