You are here

public function vfsStreamDirectoryTestCase::nonExistingChild in Zircon Profile 8

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

@test

File

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

Class

vfsStreamDirectoryTestCase
Test for org\bovigo\vfs\vfsStreamDirectory.

Namespace

org\bovigo\vfs

Code

public function nonExistingChild() {
  $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
    ->assertFalse($this->dir
    ->removeChild('bar'));
}