From 61a8b4fb7e1574ba95b0d765f41053be67e6d821 Mon Sep 17 00:00:00 2001 From: Anton Grebnev Date: Tue, 1 Nov 2011 19:00:57 +0400 Subject: [PATCH] some little changes --- tests/LoadTest.php | 2 +- tests/app/router/RouteTest.php | 4 ++-- tests/classes/EnvTest.php | 8 ++++++++ tests/layout/LayoutTest.php | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/LoadTest.php b/tests/LoadTest.php index fafafae..f3296e2 100644 --- a/tests/LoadTest.php +++ b/tests/LoadTest.php @@ -10,7 +10,7 @@ * Unit tests for Load class */ -require dirname(__FILE__) . '/../Load.php'; +require_once dirname(__FILE__) . '/../Load.php'; require_once 'vfsStream/vfsStream.php'; class LoadTest extends PHPUnit_Framework_TestCase diff --git a/tests/app/router/RouteTest.php b/tests/app/router/RouteTest.php index 4605c84..dd21711 100644 --- a/tests/app/router/RouteTest.php +++ b/tests/app/router/RouteTest.php @@ -5,9 +5,9 @@ * @link http://netmonsters.ru * @package Majestic * @subpackage UnitTests - * @since 2011-10-11 + * @since 2011-10-31 * - * Unit tests for Route class + * Unit tests for Router class */ require_once dirname(__FILE__) . '/../../../app/router/Route.php'; diff --git a/tests/classes/EnvTest.php b/tests/classes/EnvTest.php index 4e80345..9d119d6 100644 --- a/tests/classes/EnvTest.php +++ b/tests/classes/EnvTest.php @@ -111,4 +111,12 @@ class EnvTest extends PHPUnit_Framework_TestCase $this->assertEquals('grebnev', Env::getParam('surname')); } + public function tearDown() + { + $env = new ReflectionClass('Env'); + $params = $env->getProperty('params'); + $params->setAccessible(true); + $params->setValue('Env', array()); + } + } diff --git a/tests/layout/LayoutTest.php b/tests/layout/LayoutTest.php index 227796b..ebc2015 100644 --- a/tests/layout/LayoutTest.php +++ b/tests/layout/LayoutTest.php @@ -31,7 +31,7 @@ class LayoutTest extends PHPUnit_Framework_TestCase if (!class_exists('RouterMock')) { $this->getMock('Router', array(), array(), 'RouterMock', false); } - if (!class_exists('PHPView')) { + if (!class_exists('PHPViewMock')) { $this->getMock('PHPView', array('fetch', 'append', 'prepend', 'assign', 'getTemplate'), array(), 'PHPViewMock', false); }