some modifications for test isolation in DEBUG environment
This commit is contained in:
@ -15,9 +15,13 @@ require_once dirname(__FILE__) . '/../../app/router/Router.php';
|
||||
require_once dirname(__FILE__) . '/../../app/FrontController.php';
|
||||
require_once dirname(__FILE__) . '/../../classes/Env.class.php';
|
||||
|
||||
|
||||
class EnvTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @runInSeparateProcess
|
||||
*/
|
||||
public function testGetRequestUri()
|
||||
{
|
||||
if(!defined('DEBUG')) {
|
||||
@ -29,8 +33,14 @@ class EnvTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertEquals('/test/index.php', Env::getRequestUri());
|
||||
}
|
||||
|
||||
/**
|
||||
* @runInSeparateProcess
|
||||
*/
|
||||
public function testTrimBaseRequestUri()
|
||||
{
|
||||
if(!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
$class = new ReflectionClass('Env');
|
||||
$this->started = $class->getProperty('request');
|
||||
$this->started->setAccessible(true);
|
||||
|
Reference in New Issue
Block a user