You are here

public function vfsStreamFileTestCase::content in Zircon Profile 8

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

test setting and getting the content of a file

@test

File

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

Class

vfsStreamFileTestCase
Test for org\bovigo\vfs\vfsStreamFile.

Namespace

org\bovigo\vfs

Code

public function content() {
  $this
    ->assertNull($this->file
    ->getContent());
  $this
    ->assertSame($this->file, $this->file
    ->setContent('bar'));
  $this
    ->assertEquals('bar', $this->file
    ->getContent());
  $this
    ->assertSame($this->file, $this->file
    ->withContent('baz'));
  $this
    ->assertEquals('baz', $this->file
    ->getContent());
}