You are here

public function vfsStreamWrapperDirSeparatorTestCase::fileCanBeAccessedUsingWinDirSeparator in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirSeparatorTestCase.php \org\bovigo\vfs\vfsStreamWrapperDirSeparatorTestCase::fileCanBeAccessedUsingWinDirSeparator()

@test

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirSeparatorTestCase.php, line 37

Class

vfsStreamWrapperDirSeparatorTestCase
Test that using windows directory separator works correct.

Namespace

org\bovigo\vfs

Code

public function fileCanBeAccessedUsingWinDirSeparator() {
  vfsStream::newFile('foo/bar/baz.txt')
    ->at($this->root)
    ->withContent('test');
  $this
    ->assertEquals('test', file_get_contents('vfs://root/foo\\bar\\baz.txt'));
}