vfsStreamResolveIncludePathTestCase.php in Zircon Profile 8.0
File
vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php
View source
<?php
namespace org\bovigo\vfs;
class vfsStreamResolveIncludePathTestCase extends \PHPUnit_Framework_TestCase {
protected $backupIncludePath;
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);
}
public function tearDown() {
set_include_path($this->backupIncludePath);
}
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'));
}
public function unknownFileCanNotBeResolvedYieldsFalse() {
$this
->assertFalse(@stream_resolve_include_path('path/unknownFile.php'));
}
}