You are here

public function vfsStreamFileTestCase::withContentAcceptsAnyFileContentInstance 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::withContentAcceptsAnyFileContentInstance()

@test @group issue_79 @since 1.3.0

File

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

Class

vfsStreamFileTestCase
Test for org\bovigo\vfs\vfsStreamFile.

Namespace

org\bovigo\vfs

Code

public function withContentAcceptsAnyFileContentInstance() {
  $mockFileContent = $this
    ->getMock('org\\bovigo\\vfs\\content\\FileContent');
  $mockFileContent
    ->expects($this
    ->once())
    ->method('content')
    ->will($this
    ->returnValue('foobarbaz'));
  $this
    ->assertEquals('foobarbaz', $this->file
    ->withContent($mockFileContent)
    ->getContent());
}