/** * Check if a `DirectoryNotFoundException` will * be thrown when adding a non existing relative path. */ public function testIfFailsOnAddingInvalidAbsoluteIncludePath() { $includePath = __DIR__ . '/notExistingPath'; $beforeIncludePath = get_include_path(); try { IncludePath::addPath($includePath); $this->fail('FileNotFoundException was expected but never thrown'); } catch (FileNotFoundException $e) { $afterIncludePath = get_include_path(); $this->assertEquals($afterIncludePath, $beforeIncludePath); } }
/** * Setup the test case. */ public function setUp() { IncludePath::addPath(Bootstrap::$testDir . '/com/mohiva/test/resources/common/lang/reflection'); }