Browse Source

some little changes

master
Anton Grebnev 13 years ago
parent
commit
61a8b4fb7e
  1. 2
      tests/LoadTest.php
  2. 4
      tests/app/router/RouteTest.php
  3. 8
      tests/classes/EnvTest.php
  4. 2
      tests/layout/LayoutTest.php

2
tests/LoadTest.php

@ -10,7 +10,7 @@
* Unit tests for Load class * Unit tests for Load class
*/ */
require dirname(__FILE__) . '/../Load.php';
require_once dirname(__FILE__) . '/../Load.php';
require_once 'vfsStream/vfsStream.php'; require_once 'vfsStream/vfsStream.php';
class LoadTest extends PHPUnit_Framework_TestCase class LoadTest extends PHPUnit_Framework_TestCase

4
tests/app/router/RouteTest.php

@ -5,9 +5,9 @@
* @link http://netmonsters.ru * @link http://netmonsters.ru
* @package Majestic * @package Majestic
* @subpackage UnitTests * @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'; require_once dirname(__FILE__) . '/../../../app/router/Route.php';

8
tests/classes/EnvTest.php

@ -111,4 +111,12 @@ class EnvTest extends PHPUnit_Framework_TestCase
$this->assertEquals('grebnev', Env::getParam('surname')); $this->assertEquals('grebnev', Env::getParam('surname'));
} }
public function tearDown()
{
$env = new ReflectionClass('Env');
$params = $env->getProperty('params');
$params->setAccessible(true);
$params->setValue('Env', array());
}
} }

2
tests/layout/LayoutTest.php

@ -31,7 +31,7 @@ class LayoutTest extends PHPUnit_Framework_TestCase
if (!class_exists('RouterMock')) { if (!class_exists('RouterMock')) {
$this->getMock('Router', array(), array(), 'RouterMock', false); $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); $this->getMock('PHPView', array('fetch', 'append', 'prepend', 'assign', 'getTemplate'), array(), 'PHPViewMock', false);
} }

Loading…
Cancel
Save