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
This commit is contained in:
AD7six 2008-08-02 19:57:04 +00:00
parent 0bfaa1ab89
commit c3e28fdb66

View file

@ -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