Fixed tests

This commit is contained in:
Francis Besset
2013-01-16 11:53:33 +01:00
parent 17d0652959
commit 3bd32c380d
3 changed files with 12 additions and 41 deletions

View File

@ -13,6 +13,8 @@
namespace BeSimple\Tests\SoapCommon\Soap;
use BeSimple\SoapCommon\Cache;
use org\bovigo\vfs\vfsStream;
use org\bovigo\vfs\vfsStreamWrapper;
class SoapRequestTest extends \PHPUnit_Framework_TestCase
{
@ -48,19 +50,19 @@ class SoapRequestTest extends \PHPUnit_Framework_TestCase
public function testSetDirectory()
{
\vfsStream::setup('Fixtures');
vfsStream::setup('Fixtures');
$this->assertFalse(\vfsStreamWrapper::getRoot()->hasChild('foo'));
$dir = \vfsStream::url('Fixtures/foo');
$this->assertFalse(vfsStreamWrapper::getRoot()->hasChild('foo'));
$dir = vfsStream::url('Fixtures/foo');
Cache::setDirectory($dir);
$this->assertEquals($dir, Cache::getDirectory());
$this->assertTrue(\vfsStreamWrapper::getRoot()->hasChild('foo'));
$this->assertTrue(vfsStreamWrapper::getRoot()->hasChild('foo'));
$this->assertFalse(\vfsStreamWrapper::getRoot()->hasChild('bar'));
$dir = \vfsStream::url('Fixtures/bar');
$this->assertFalse(vfsStreamWrapper::getRoot()->hasChild('bar'));
$dir = vfsStream::url('Fixtures/bar');
Cache::setDirectory($dir);
$this->assertEquals($dir, Cache::getDirectory());
$this->assertTrue(\vfsStreamWrapper::getRoot()->hasChild('bar'));
$this->assertTrue(vfsStreamWrapper::getRoot()->hasChild('bar'));
}
public function testSetLifetime()