mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Updating DboSource test to remove protected access and use methods instead.
This commit is contained in:
parent
3f7405c8d6
commit
22cf13b6b6
1 changed files with 5 additions and 2 deletions
|
@ -3948,7 +3948,8 @@ class DboSourceTest extends CakeTestCase {
|
|||
$this->testDb->logQuery('Query 1');
|
||||
$this->testDb->logQuery('Query 2');
|
||||
|
||||
$result = Set::extract($this->testDb->_queriesLog, '/query');
|
||||
$log = $this->testDb->getLog(false, false);
|
||||
$result = Set::extract($log['log'], '/query');
|
||||
$expected = array('Query 1', 'Query 2');
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
|
@ -3958,10 +3959,12 @@ class DboSourceTest extends CakeTestCase {
|
|||
$this->assertFalse($result);
|
||||
$this->testDb->error = $oldError;
|
||||
|
||||
$result = Set::combine($this->testDb->_queriesLog, '/query', '/error');
|
||||
$log = $this->testDb->getLog(false, false);
|
||||
$result = Set::combine($log['log'], '/query', '/error');
|
||||
$expected = array('Query 1' => false, 'Query 2' => false, 'Error 1' => true);
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
Configure::write('debug', 2);
|
||||
ob_start();
|
||||
$this->testDb->showLog();
|
||||
$contents = ob_get_clean();
|
||||
|
|
Loading…
Reference in a new issue