public function vfsStreamWrapperTestCase::truncateToGreaterSizeAddsZeroBytes in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php \org\bovigo\vfs\vfsStreamWrapperTestCase::truncateToGreaterSizeAddsZeroBytes()
@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 645
Class
Namespace
org\bovigo\vfsCode
public function truncateToGreaterSizeAddsZeroBytes() {
if (strstr(PHP_VERSION, 'hiphop') !== false) {
$this
->markTestSkipped('Not supported on hhvm');
}
$handle = fopen($this->baz1URL, "r+");
$this
->assertTrue(ftruncate($handle, 25));
$this
->assertEquals(25, filesize($this->baz1URL));
$this
->assertEquals("baz 1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", file_get_contents($this->baz1URL));
fclose($handle);
}