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

@ -24,9 +24,8 @@ class EnvTest extends PHPUnit_Framework_TestCase
*/
public function testGetRequestUri()
{
if(!defined('DEBUG')) {
define('DEBUG', false);
}
Config::set('DEBUG', 0);
$_SERVER['REQUEST_URI'] = '/test/index.php?id=1&test=wet&id_theme=512';
$this->assertSame('/test/index.php', Env::getRequestUri());
$_SERVER['REQUEST_URI'] = '/tes?t/index.php?id=1&test=wet&id_theme=512';
@ -38,9 +37,8 @@ class EnvTest extends PHPUnit_Framework_TestCase
*/
public function testTrimBaseRequestUri()
{
if(!defined('DEBUG')) {
define('DEBUG', false);
}
Config::set('DEBUG', 0);
$class = new ReflectionClass('Env');
$this->started = $class->getProperty('request');
$this->started->setAccessible(true);