class vfsStreamResolveIncludePathTestCase in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php \org\bovigo\vfs\vfsStreamResolveIncludePathTestCase
Test for org\bovigo\vfs\vfsStream.
@since 0.9.0 @group issue_5
Hierarchy
- class \org\bovigo\vfs\vfsStreamResolveIncludePathTestCase extends \org\bovigo\vfs\PHPUnit_Framework_TestCase
Expanded class hierarchy of vfsStreamResolveIncludePathTestCase
File
- vendor/
mikey179/ vfsStream/ src/ test/ php/ org/ bovigo/ vfs/ vfsStreamResolveIncludePathTestCase.php, line 17
Namespace
org\bovigo\vfsView source
class vfsStreamResolveIncludePathTestCase extends \PHPUnit_Framework_TestCase {
/**
* include path to restore after test run
*
* @var string
*/
protected $backupIncludePath;
/**
* set up test environment
*/
public function setUp() {
$this->backupIncludePath = get_include_path();
vfsStream::setup();
mkdir('vfs://root/a/path', 0777, true);
set_include_path('vfs://root/a' . PATH_SEPARATOR . $this->backupIncludePath);
}
/**
* clean up test environment
*/
public function tearDown() {
set_include_path($this->backupIncludePath);
}
/**
* @test
*/
public function knownFileCanBeResolved() {
file_put_contents('vfs://root/a/path/knownFile.php', '<?php ?>');
$this
->assertEquals('vfs://root/a/path/knownFile.php', stream_resolve_include_path('path/knownFile.php'));
}
/**
* @test
*/
public function unknownFileCanNotBeResolvedYieldsFalse() {
$this
->assertFalse(@stream_resolve_include_path('path/unknownFile.php'));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
vfsStreamResolveIncludePathTestCase:: |
protected | property | include path to restore after test run | |
vfsStreamResolveIncludePathTestCase:: |
public | function | @test | |
vfsStreamResolveIncludePathTestCase:: |
public | function | set up test environment | |
vfsStreamResolveIncludePathTestCase:: |
public | function | clean up test environment | |
vfsStreamResolveIncludePathTestCase:: |
public | function | @test |