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

@ -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'));