Replace constant DEBUG to use in Config. Remove start profiler from FrontController (moved to bootstrap).
This commit is contained in:
@ -61,9 +61,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testAffectedNumRowsNoResult()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
$this->assertFalse($this->stmt->affectedRows());
|
||||
$this->assertFalse($this->stmt->numRows());
|
||||
|
||||
@ -82,9 +80,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testAffectedNumRows()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
@ -100,9 +96,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetInsertId()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
|
||||
$this->request = $this->getMockBuilder('InsertMongoCommand')
|
||||
@ -131,9 +125,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExecute()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
|
||||
$this->setDriverGetConnectionMethod()->setRequestExecuteMethod();
|
||||
$this->assertTrue($this->stmt->execute());
|
||||
@ -145,9 +137,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExecuteNoResult()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->any())
|
||||
@ -163,9 +153,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExecuteNoConnection()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
$this->driver
|
||||
->expects($this->any())
|
||||
->method('getConnection')
|
||||
@ -180,9 +168,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExecuteWithDebug()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1;
|
||||
$this->setDriverGetConnectionMethod()->setRequestExecuteMethod();
|
||||
$this->assertTrue($this->stmt->execute());
|
||||
$this->assertEquals(10, $this->stmt->numRows());
|
||||
@ -194,9 +180,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testBindParam()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1;
|
||||
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
@ -217,9 +201,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetch()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1;
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod()->setRequestForFetch();
|
||||
@ -236,9 +218,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchWithInitialArray()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1;
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod();
|
||||
@ -257,9 +237,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchAssocFromCursor()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1;
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod()->setRequestForFetch();
|
||||
@ -276,9 +254,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchAssocFromArray()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1;
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod();
|
||||
@ -298,9 +274,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchWrongMode()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1;
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod();
|
||||
@ -320,9 +294,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testSkipOrderLimit()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1;
|
||||
$this->setDriverGetConnectionMethod()->setRequestForFetch();
|
||||
|
||||
$this->stmt->execute();
|
||||
@ -340,9 +312,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testCount()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1;
|
||||
$this->setDriverGetConnectionMethod()->setRequestForFetch();
|
||||
|
||||
$this->stmt->execute();
|
||||
@ -357,9 +327,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testCountException()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1;
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
@ -377,9 +345,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testOrderException()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1;
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
@ -397,9 +363,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testSkipException()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1;
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
@ -417,9 +381,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testLimitException()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1;
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
|
Reference in New Issue
Block a user