public function LargeFileContentTestCase::truncateRemovesWrittenContentAfterOffset in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/LargeFileContentTestCase.php \org\bovigo\vfs\content\LargeFileContentTestCase::truncateRemovesWrittenContentAfterOffset()
@test
File
- vendor/
mikey179/ vfsStream/ src/ test/ php/ org/ bovigo/ vfs/ content/ LargeFileContentTestCase.php, line 179
Class
Namespace
org\bovigo\vfs\contentCode
public function truncateRemovesWrittenContentAfterOffset() {
$this->largeFileContent
->seek(45, SEEK_SET);
$this->largeFileContent
->write('foobarbaz');
$this
->assertTrue($this->largeFileContent
->truncate(50));
$this
->assertEquals(str_repeat(' ', 45) . 'fooba', $this->largeFileContent
->content());
}