X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fmikey179%2FvfsStream%2Fsrc%2Ftest%2Fphp%2Forg%2Fbovigo%2Fvfs%2FvfsStreamResolveIncludePathTestCase.php;fp=vendor%2Fmikey179%2FvfsStream%2Fsrc%2Ftest%2Fphp%2Forg%2Fbovigo%2Fvfs%2FvfsStreamResolveIncludePathTestCase.php;h=ae8919367c0569ec70fda8ddc10c5efb5e371451;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php new file mode 100644 index 000000000..ae8919367 --- /dev/null +++ b/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php @@ -0,0 +1,61 @@ +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', ''); + $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')); + } +}