You are here

public function vfsStreamWrapperFileTestCase::canNotOverwriteExistingFileWithModeX in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php \org\bovigo\vfs\vfsStreamWrapperFileTestCase::canNotOverwriteExistingFileWithModeX()

@test @group issue7 @group issue13

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php, line 203

Class

vfsStreamWrapperFileTestCase
Test for org\bovigo\vfs\vfsStreamWrapper.

Namespace

org\bovigo\vfs

Code

public function canNotOverwriteExistingFileWithModeX() {
  $vfsFile = vfsStream::url('foo/overwrite.txt');
  file_put_contents($vfsFile, 'test');
  $this
    ->assertFalse(@fopen($vfsFile, 'xb'));
  $this
    ->assertEquals('test', file_get_contents($vfsFile));
}