Skip to content

Commit

Permalink
Making the ClassLoaderTest more friendly to other tests by not wiping…
Browse files Browse the repository at this point in the history
… the include path.
  • Loading branch information
KrisJordan committed Sep 13, 2009
1 parent eaf4ca0 commit d4cb3a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions recess/test/recess/core/ClassLoaderTest.php
Expand Up @@ -4,6 +4,8 @@
include_once __DIR__ . '/../../../recess/core/ClassLoader.class.php';
use recess\core\ClassLoader;

set_include_path(__DIR__.'/../../'.PATH_SEPARATOR.get_include_path());

class ClassLoaderTest extends PHPUnit_Framework_TestCase {

function testOnLoad() {
Expand Down Expand Up @@ -34,15 +36,13 @@ function($load,$class) use (&$loadedCount) {
}

function testLoadDummy() {
set_include_path(__DIR__.'/../../');
ClassLoader::load('recess\core\Dummy');
$dummy = new recess\core\Dummy;
$this->assertType('recess\core\Dummy',$dummy);
$this->assertEquals('hello world',$dummy->helloWorld());
}

function testWrapAfterLoadDummy() {
set_include_path(__DIR__.'/../../');
ClassLoader::load('recess\core\Dummy');
$loadedCount = 0;
ClassLoader::wrapLoad(
Expand Down

0 comments on commit d4cb3a4

Please sign in to comment.