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

@ -207,7 +207,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
public function testFetch()
{
Config::set('PROFILER', true);
Config::set('PROFILER_DETAILS', true);
Config::set('PROFILER_DETAILS', false);
$this->assertFalse($this->stmt->fetch());
$this->setDriverGetConnectionMethod()->setRequestForFetch();
@ -216,6 +216,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
$result = $this->stmt->fetch();
$this->assertEquals('prev', $result->next);
$this->assertFalse($this->stmt->fetch());
$this->assertContains('Queries not counted.', Profiler::getInstance()->getCli());
}
/**