You are here

public function vfsStreamDirectoryTestCase::hasChildrenReturnsTrueIfAtLeastOneChildPresent in Zircon Profile 8.0

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

@test @since 0.10.0

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php, line 95

Class

vfsStreamDirectoryTestCase
Test for org\bovigo\vfs\vfsStreamDirectory.

Namespace

org\bovigo\vfs

Code

public function hasChildrenReturnsTrueIfAtLeastOneChildPresent() {
  $mockChild = $this
    ->getMock('org\\bovigo\\vfs\\vfsStreamContent');
  $mockChild
    ->expects($this
    ->any())
    ->method('appliesTo')
    ->will($this
    ->returnValue(false));
  $mockChild
    ->expects($this
    ->any())
    ->method('getName')
    ->will($this
    ->returnValue('baz'));
  $this->dir
    ->addChild($mockChild);
  $this
    ->assertTrue($this->dir
    ->hasChildren());
}