public function vfsStreamWrapperTestCase::truncateRemovesSuperflouosContent in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php \org\bovigo\vfs\vfsStreamWrapperTestCase::truncateRemovesSuperflouosContent()
@test @group issue_33 @since 1.1.0 @requires PHP 5.4.0
File
- vendor/
mikey179/ vfsStream/ src/ test/ php/ org/ bovigo/ vfs/ vfsStreamWrapperTestCase.php, line 626
Class
Namespace
org\bovigo\vfsCode
public function truncateRemovesSuperflouosContent() {
if (strstr(PHP_VERSION, 'hiphop') !== false) {
$this
->markTestSkipped('Not supported on hhvm');
}
$handle = fopen($this->baz1URL, "r+");
$this
->assertTrue(ftruncate($handle, 0));
$this
->assertEquals(0, filesize($this->baz1URL));
$this
->assertEquals('', file_get_contents($this->baz1URL));
fclose($handle);
}