You are here

public function StringBasedFileContentTestCase::writeAppendsContentWhenOffsetAtEof in Zircon Profile 8

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

@test

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/StringBasedFileContentTestCase.php, line 177

Class

StringBasedFileContentTestCase
Test for org\bovigo\vfs\content\StringBasedFileContent.

Namespace

org\bovigo\vfs\content

Code

public function writeAppendsContentWhenOffsetAtEof() {
  $this
    ->assertTrue($this->stringBasedFileContent
    ->seek(0, SEEK_END));
  $this
    ->assertEquals(3, $this->stringBasedFileContent
    ->write('bar'));
  $this
    ->assertEquals('foobarbazbar', $this->stringBasedFileContent
    ->content());
}