You are here

public function vfsStreamContainerIteratorTestCase::setUp in Zircon Profile 8

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

set up test environment

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamContainerIteratorTestCase.php, line 38

Class

vfsStreamContainerIteratorTestCase
Test for org\bovigo\vfs\vfsStreamContainerIterator.

Namespace

org\bovigo\vfs

Code

public function setUp() {
  $this->dir = new vfsStreamDirectory('foo');
  $this->mockChild1 = $this
    ->getMock('org\\bovigo\\vfs\\vfsStreamContent');
  $this->mockChild1
    ->expects($this
    ->any())
    ->method('getName')
    ->will($this
    ->returnValue('bar'));
  $this->dir
    ->addChild($this->mockChild1);
  $this->mockChild2 = $this
    ->getMock('org\\bovigo\\vfs\\vfsStreamContent');
  $this->mockChild2
    ->expects($this
    ->any())
    ->method('getName')
    ->will($this
    ->returnValue('baz'));
  $this->dir
    ->addChild($this->mockChild2);
}