Replace constant DEBUG to use in Config. Remove start profiler from FrontController (moved to bootstrap).
This commit is contained in:
@ -43,9 +43,8 @@ class CliLoggerTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testLog()
|
||||
{
|
||||
if(!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
|
||||
Config::set('DEBUG', 1);
|
||||
$logger = Logger::getInstance();
|
||||
ob_start();
|
||||
$logger->setPid(123);
|
||||
|
@ -54,9 +54,7 @@ class FileLoggerTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testCannotWrite()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1);
|
||||
$conf = array('logger' => 'FileLogger', 'filepath' => '/log.txt');
|
||||
Config::set('Logger', $conf);
|
||||
|
||||
@ -71,9 +69,7 @@ class FileLoggerTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testLog()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1);
|
||||
$this->assertFileNotExists($this->conf['filepath']);
|
||||
$logger = Logger::getInstance();
|
||||
$logger->setPid(123);
|
||||
@ -86,9 +82,7 @@ class FileLoggerTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testDestruct()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
Config::set('DEBUG', 1);
|
||||
$my_pid = posix_getpid();
|
||||
$fd_command = 'lsof -n -p ' . $my_pid . ' | wc -l';
|
||||
$fd_count_start = (int) `$fd_command`;
|
||||
|
Reference in New Issue
Block a user