From c3e28fdb66e8789d851d0546afbb8f6d4c77ff19 Mon Sep 17 00:00:00 2001 From: AD7six Date: Sat, 2 Aug 2008 19:57:04 +0000 Subject: [PATCH] correcting eroneous reference to $db in model tests git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7423 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/tests/cases/libs/model/model.test.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cake/tests/cases/libs/model/model.test.php b/cake/tests/cases/libs/model/model.test.php index c227db019..7127bf184 100644 --- a/cake/tests/cases/libs/model/model.test.php +++ b/cake/tests/cases/libs/model/model.test.php @@ -886,7 +886,7 @@ class ModelTest extends CakeTestCase { $this->loadFixtures('CategoryThread'); $TestModel =& new CategoryThread(); - $fullDebug = $db->fullDebug; + $fullDebug = $this->db->fullDebug; $this->db->fullDebug = true; $TestModel->recursive = 6; $TestModel->id = 7; @@ -899,7 +899,7 @@ class ModelTest extends CakeTestCase { 'ParentCategory' => array('id' => 3, 'parent_id' => 2, 'name' => 'Category 1.1.1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31', 'ParentCategory' => array('id' => 2, 'parent_id' => 1, 'name' => 'Category 1.1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31', 'ParentCategory' => array('id' => 1, 'parent_id' => 0, 'name' => 'Category 1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'))))))); - $db->fullDebug = $fullDebug; + $this->db->fullDebug = $fullDebug; $this->assertEqual($result, $expected); } /** @@ -912,7 +912,7 @@ class ModelTest extends CakeTestCase { $this->loadFixtures('CategoryThread'); $TestModel =& new CategoryThread(); - $fullDebug = $db->fullDebug; + $fullDebug = $this->db->fullDebug; $this->db->fullDebug = true; $TestModel->recursive = 6; $result = $TestModel->find(array('CategoryThread.id' => 7)); @@ -925,7 +925,7 @@ class ModelTest extends CakeTestCase { 'ParentCategory' => array('id' => 3, 'parent_id' => 2, 'name' => 'Category 1.1.1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31', 'ParentCategory' => array('id' => 2, 'parent_id' => 1, 'name' => 'Category 1.1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31', 'ParentCategory' => array('id' => 1, 'parent_id' => 0, 'name' => 'Category 1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'))))))); - $db->fullDebug = $fullDebug; + $this->db->fullDebug = $fullDebug; $this->assertEqual($result, $expected); } /** @@ -938,7 +938,7 @@ class ModelTest extends CakeTestCase { $this->loadFixtures('CategoryThread'); $TestModel =& new CategoryThread(); - $fullDebug = $db->fullDebug; + $fullDebug = $this->db->fullDebug; $this->db->fullDebug = true; $TestModel->recursive = 6; $result = $TestModel->find('all', null, null, 'CategoryThread.id ASC'); @@ -977,7 +977,7 @@ class ModelTest extends CakeTestCase { 'ParentCategory' => array('id' => 3, 'parent_id' => 2, 'name' => 'Category 1.1.1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31', 'ParentCategory' => array('id' => 2, 'parent_id' => 1, 'name' => 'Category 1.1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31', 'ParentCategory' => array('id' => 1, 'parent_id' => 0, 'name' => 'Category 1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31')))))))); - $db->fullDebug = $fullDebug; + $this->db->fullDebug = $fullDebug; $this->assertEqual($result, $expected); } /** @@ -1476,7 +1476,7 @@ class ModelTest extends CakeTestCase { $result = $TestModel->findCount(); $this->assertEqual($result, 4); - $fullDebug = $db->fullDebug; + $fullDebug = $this->db->fullDebug; $this->db->fullDebug = true; $TestModel->order = 'User.id'; $this->db->_queriesLog = array(); @@ -1487,7 +1487,7 @@ class ModelTest extends CakeTestCase { $this->assertNoPattern('/ORDER\s+BY/', $this->db->_queriesLog[0]['query']); $this->db->_queriesLog = array(); - $db->fullDebug = $fullDebug; + $this->db->fullDebug = $fullDebug; } /** * testFindMagic method