Replace constant DEBUG to use in Config. Remove start profiler from FrontController (moved to bootstrap).
This commit is contained in:
@ -81,9 +81,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExecute()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
|
||||
$this->driver
|
||||
->expects($this->any())
|
||||
@ -102,9 +100,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExecuteNoPlaceholders()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
|
||||
$this->sql = 'PLAIN SQL';
|
||||
@ -118,9 +114,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchNoResult()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
}
|
||||
|
||||
@ -130,9 +124,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testDriverExecuteNoResult()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
$this->setDriverGetConnectionWrongResultMethod();
|
||||
$this->setExpectedException('GeneralException', 'ERROR');
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
@ -144,9 +136,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetch()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
$this->assertSame('OBJECT', $this->stmt->fetch());
|
||||
@ -161,9 +151,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchObject()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
$this->assertSame('OBJECT', $this->stmt->fetchObject());
|
||||
@ -175,9 +163,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchPairs()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
|
||||
$resultMock = $this->getMockBuilder('mysqli_result')
|
||||
->disableOriginalConstructor()
|
||||
@ -232,9 +218,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testClose()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
$this->assertAttributeEquals(null, 'result', $this->stmt);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
@ -275,9 +259,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
public function testNumRows()
|
||||
{
|
||||
$this->markTestSkipped('Unable to execute a method or access a property of an incomplete object.');
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
$this->assertNull($this->stmt->numRows());
|
||||
@ -289,9 +271,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchInvalidMode()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
Config::set('DEBUG', 0);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
|
||||
|
Reference in New Issue
Block a user