Changeset 1143
- Timestamp:
- 12/13/07 18:35:52 (7 months ago)
- Files:
-
- trunk/build/vfs (added)
- trunk/build/vfs/build (added)
- trunk/build/vfs/build.xml (added)
- trunk/src/main/php/org/simpletest/extensions/streamwrapper (deleted)
- trunk/src/main/php/org/simpletest/test/extensions/streamwrapper (deleted)
- trunk/src/main/php/org/stubbles/vfs (added)
- trunk/src/main/php/org/stubbles/vfs/vfsStreamAbstractContent.php (added)
- trunk/src/main/php/org/stubbles/vfs/vfsStreamContent.php (added)
- trunk/src/main/php/org/stubbles/vfs/vfsStreamDirectory.php (added)
- trunk/src/main/php/org/stubbles/vfs/vfsStreamException.php (added)
- trunk/src/main/php/org/stubbles/vfs/vfsStreamFile.php (added)
- trunk/src/main/php/org/stubbles/vfs/vfsStreamWrapper.php (added)
- trunk/src/test/php/net/stubbles/util/cache/stubFileCacheContainerTestCase.php (modified) (9 diffs)
- trunk/src/test/php/org/stubbles (added)
- trunk/src/test/php/org/stubbles/vfs (added)
- trunk/src/test/php/org/stubbles/vfs/run.php (added)
- trunk/src/test/php/org/stubbles/vfs/vfsStreamDirectoryTestCase.php (added)
- trunk/src/test/php/org/stubbles/vfs/vfsStreamFileTestCase.php (added)
- trunk/src/test/php/org/stubbles/vfs/vfsStreamWrapperTestCase.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/test/php/net/stubbles/util/cache/stubFileCacheContainerTestCase.php
r982 r1143 9 9 stubClassLoader::load('net.stubbles.util.cache.stubFileCacheContainer'); 10 10 Mock::generate('stubCacheStrategy'); 11 require_once TEST_SRC_PATH . '/../main/php/org/s impletest/extensions/streamwrapper/stream_wrapper.php';11 require_once TEST_SRC_PATH . '/../main/php/org/stubbles/vfs/vfsStreamWrapper.php'; 12 12 /** 13 13 * Tests for net.stubbles.util.cache.stubFileCacheContainer. … … 42 42 public function setUp() 43 43 { 44 SimpleTestStreamWrapper::register();45 SimpleTestStreamWrapper::setRoot(new SimpleTestStreamDirectory('cache'));44 vfsStreamWrapper::register(); 45 vfsStreamWrapper::setRoot(new vfsStreamDirectory('cache')); 46 46 $this->mockCacheStrategy = new MockstubCacheStrategy(); 47 47 $this->cacheContainer = new stubFileCacheContainer('id'); 48 48 $this->cacheContainer->setStrategy($this->mockCacheStrategy); 49 $this->cacheContainer->setCacheDirectory( SimpleTestStreamWrapper::PROTOCOL . '://cache');50 $this->cacheDirectory = SimpleTestStreamWrapper::getRoot()->getChild('id');49 $this->cacheContainer->setCacheDirectory(vfsStreamWrapper::PROTOCOL . '://cache'); 50 $this->cacheDirectory = vfsStreamWrapper::getRoot()->getChild('id'); 51 51 } 52 52 … … 76 76 public function testHas() 77 77 { 78 $foo = new SimpleTestStreamFile('foo.cache');78 $foo = new vfsStreamFile('foo.cache'); 79 79 $foo->setContent('bar'); 80 80 $this->cacheDirectory->addChild($foo); … … 92 92 public function testGet() 93 93 { 94 $foo = new SimpleTestStreamFile('foo.cache');94 $foo = new vfsStreamFile('foo.cache'); 95 95 $foo->setContent('bar'); 96 96 $this->cacheDirectory->addChild($foo); … … 108 108 public function testGetSize() 109 109 { 110 $foo = new SimpleTestStreamFile('foo.cache');110 $foo = new vfsStreamFile('foo.cache'); 111 111 $foo->setContent('bar'); 112 112 $this->cacheDirectory->addChild($foo); … … 124 124 public function testGetUsedSpace() 125 125 { 126 $foo = new SimpleTestStreamFile('foo.cache');126 $foo = new vfsStreamFile('foo.cache'); 127 127 $foo->setContent('bar'); 128 128 $this->cacheDirectory->addChild($foo); … … 138 138 public function testGetKeys() 139 139 { 140 $foo = new SimpleTestStreamFile('foo.cache');140 $foo = new vfsStreamFile('foo.cache'); 141 141 $foo->setContent('bar'); 142 142 $this->cacheDirectory->addChild($foo); … … 158 158 public function testGc() 159 159 { 160 $foo = new SimpleTestStreamFile('foo.cache');160 $foo = new vfsStreamFile('foo.cache'); 161 161 $foo->setContent('bar'); 162 162 $this->cacheDirectory->addChild($foo); … … 207 207 public function testtestKeyContainingDirectorySeperatorAndExistingCacheFile() 208 208 { 209 $foo = new SimpleTestStreamFile('barfoo.cache');209 $foo = new vfsStreamFile('barfoo.cache'); 210 210 $foo->setContent('bar'); 211 211 $this->cacheDirectory->addChild($foo);
