Replace constant DEBUG to use in Config. Remove start profiler from FrontController (moved to bootstrap).

This commit is contained in:
Alexander Demidov
2012-06-27 17:56:06 +04:00
parent bcc9be619d
commit cfd6536c5f
26 changed files with 134 additions and 322 deletions

View File

@ -57,9 +57,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
*/
public function testDriver()
{
if (!defined('DEBUG')) {
define('DEBUG', false);
}
Config::set('DEBUG', 0);
$driver = new MySQLiDriver($this->conf);
@ -78,9 +76,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
*/
public function testGetConnection()
{
if (!defined('DEBUG')) {
define('DEBUG', false);
}
Config::set('DEBUG', 0);
$driver = new MySQLiDriver($this->conf);
$this->assertInstanceOf('mysqli', $driver->getConnection());
@ -91,9 +87,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
*/
public function testGetConnectionWrongConfig()
{
if (!defined('DEBUG')) {
define('DEBUG', false);
}
Config::set('DEBUG', 0);
$this->conf['database'] = 'nodb';
$driver = new MySQLiDriver($this->conf);
@ -106,9 +100,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
*/
public function testDisconnect()
{
if (!defined('DEBUG')) {
define('DEBUG', false);
}
Config::set('DEBUG', 0);
$driver = new MySQLiDriver($this->conf);
@ -125,9 +117,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
*/
public function testInsert()
{
if (!defined('DEBUG')) {
define('DEBUG', false);
}
Config::set('DEBUG', 0);
$driver = new MySQLiDriver($this->conf);
@ -147,9 +137,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
*/
public function testGetInsertId()
{
if (!defined('DEBUG')) {
define('DEBUG', false);
}
Config::set('DEBUG', 0);
$driver = new MySQLiDriver($this->conf);
@ -161,9 +149,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
*/
public function testTransaction()
{
if (!defined('DEBUG')) {
define('DEBUG', false);
}
Config::set('DEBUG', 0);
$driver = new MySQLiDriver($this->conf);
@ -194,9 +180,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
*/
public function testRollback()
{
if (!defined('DEBUG')) {
define('DEBUG', false);
}
Config::set('DEBUG', 0);
$driver = new MySQLiDriver($this->conf);