3 * This file is part of vfsStream.
5 * For the full copyright and license information, please view the LICENSE
6 * file that was distributed with this source code.
8 * @package org\bovigo\vfs
10 namespace org\bovigo\vfs;
12 * Test for org\bovigo\vfs\vfsStreamWrapper.
14 abstract class vfsStreamWrapperBaseTestCase extends \PHPUnit_Framework_TestCase
19 * @var vfsStreamDirectory
23 * URL of root directory
31 * @var vfsStreamDirectory
35 * URL of sub directory
66 * set up test environment
68 public function setUp()
70 $this->fooURL = vfsStream::url('foo');
71 $this->barURL = vfsStream::url('foo/bar');
72 $this->baz1URL = vfsStream::url('foo/bar/baz1');
73 $this->baz2URL = vfsStream::url('foo/baz2');
74 $this->foo = new vfsStreamDirectory('foo');
75 $this->bar = new vfsStreamDirectory('bar');
76 $this->baz1 = vfsStream::newFile('baz1')
79 ->lastAttributeModified(300)
80 ->withContent('baz 1');
81 $this->baz2 = vfsStream::newFile('baz2')
85 ->lastAttributeModified(400);
86 $this->bar->addChild($this->baz1);
87 $this->foo->addChild($this->bar);
88 $this->foo->addChild($this->baz2);
89 $this->foo->lastModified(100)
91 ->lastAttributeModified(100);
92 $this->bar->lastModified(200)
94 ->lastAttributeModified(100);
95 vfsStreamWrapper::register();
96 vfsStreamWrapper::setRoot($this->foo);