Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updating DboSource test to remove protected access and use methods in…

…stead.
  • Loading branch information...
commit 22cf13b6b6a456cb6f42ae3799f7ffb045572ce8 1 parent 3f7405c
@markstory markstory authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 cake/tests/cases/libs/model/datasources/dbo_source.test.php
View
7 cake/tests/cases/libs/model/datasources/dbo_source.test.php
@@ -3948,7 +3948,8 @@ function testLog() {
$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 @@ function testLog() {
$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();
Please sign in to comment.
Something went wrong with that request. Please try again.