You are here

public function vfsStreamTestCase::setupCastsNumericDirectoriesToStrings in Zircon Profile 8.0

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

@test @group issue_17 @group issue_20

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamTestCase.php, line 337

Class

vfsStreamTestCase
Test for org\bovigo\vfs\vfsStream.

Namespace

org\bovigo\vfs

Code

public function setupCastsNumericDirectoriesToStrings() {
  $root = vfsStream::setup('root', null, array(
    2011 => array(
      'test.txt' => 'some content',
    ),
  ));
  $this
    ->assertTrue($root
    ->hasChild('2011'));
  $directory = $root
    ->getChild('2011');
  $this
    ->assertVfsFile($directory
    ->getChild('test.txt'), 'some content');
  $this
    ->assertTrue(file_exists('vfs://root/2011/test.txt'));
}