Replace constant DEBUG to use in Config. Remove start profiler from FrontController (moved to bootstrap).
This commit is contained in:
@ -40,18 +40,16 @@ class LayoutTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testConstruct()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
|
||||
Config::set('DEBUG', 0);
|
||||
$layout = $this->getMockForAbstractClass('Layout');
|
||||
$this->assertAttributeInstanceOf('PHPView', 'view', $layout);
|
||||
}
|
||||
|
||||
public function testFetch()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
|
||||
Config::set('DEBUG', 0);
|
||||
$layout = $this->getMockForAbstractClass('Layout');
|
||||
|
||||
$action = $this->getMock('Action', array('fetch'));
|
||||
@ -64,9 +62,8 @@ class LayoutTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testFetchWithTemplate()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
|
||||
Config::set('DEBUG', 0);
|
||||
$layout = $this->getMockForAbstractClass('Layout');
|
||||
|
||||
$class = new ReflectionClass('Layout');
|
||||
@ -89,9 +86,8 @@ class LayoutTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testAppend()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
|
||||
Config::set('DEBUG', 0);
|
||||
$layout = $this->getMockForAbstractClass('Layout', array('append', 'prepend'), 'LayoutMock');
|
||||
$action = $this->getMock('Action', array('fetch'));
|
||||
|
||||
|
Reference in New Issue
Block a user