You are here

public function vfsStreamFileTestCase::truncateRemovesSuperflouosContent in Zircon Profile 8.0

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

@test @group issue_33 @since 1.1.0

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php, line 257

Class

vfsStreamFileTestCase
Test for org\bovigo\vfs\vfsStreamFile.

Namespace

org\bovigo\vfs

Code

public function truncateRemovesSuperflouosContent() {
  $this
    ->assertEquals(11, $this->file
    ->write("lorem ipsum"));
  $this
    ->assertTrue($this->file
    ->truncate(5));
  $this
    ->assertEquals(5, $this->file
    ->size());
  $this
    ->assertEquals('lorem', $this->file
    ->getContent());
}