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

@ -21,9 +21,8 @@ class AjaxActionTest extends Action_TestCase
*/
public function testConstruct()
{
if(!defined('DEBUG')) {
define('DEBUG', false);
}
Config::set('DEBUG', 0);
Env::setParams(array('ajax' => 'AjaxTemplate', 'param2' => 'value2'));
$action = $this->getMockForAbstractClass('AjaxAction' );
$this->assertAttributeEquals('ajax', 'template', $action);
@ -34,9 +33,8 @@ class AjaxActionTest extends Action_TestCase
*/
public function testFetchWithEncode()
{
if(!defined('DEBUG')) {
define('DEBUG', false);
}
Config::set('DEBUG', 0);
$controller = FrontController::getInstance();
$controller->setView('SomeView');
$action = $this->getMockForAbstractClass('AjaxAction' );
@ -51,9 +49,8 @@ class AjaxActionTest extends Action_TestCase
*/
public function testFetchNoEncode()
{
if(!defined('DEBUG')) {
define('DEBUG', false);
}
Config::set('DEBUG', 0);
Env::setParams(array('encode' => false));
$controller = FrontController::getInstance();
$controller->setView('SomeView');