Add Profiler support report message with turn on PROFILER_DETAILS (if use to show queries). Modified tests MongoStatementTest, MySQLiStatementTest. Adding new tests to ProfilerTest.

This commit is contained in:
Alexander Demidov
2012-07-19 17:07:54 +04:00
parent ed0c9f207f
commit a16a995ed3
4 changed files with 205 additions and 8 deletions

View File

@ -220,6 +220,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
*/
public function testClose()
{
Config::set('PROFILER', true);
Config::set('PROFILER_DETAILS', false);
$this->assertAttributeEquals(null, 'result', $this->stmt);
$this->setDriverGetConnectionMethod();
@ -227,6 +228,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
$this->assertAttributeNotEquals(null, 'result', $this->stmt);
$this->stmt->close();
$this->assertAttributeEquals(null, 'result', $this->stmt);
$this->assertContains('Queries not counted.', Profiler::getInstance()->getCli());
}
/**