Fixed typo and added unit tests

This commit is contained in:
Francis Besset
2011-10-11 21:24:32 +02:00
parent 0f30119294
commit f95a5177b1
5 changed files with 80 additions and 9 deletions

View File

@ -25,6 +25,12 @@ class SoapRequestTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(Cache::DISABLED, Cache::isEnabled());
}
public function testSetEnabledBadValue()
{
$this->setExpectedException('InvalidArgumentException');
Cache::setEnabled('foo');
}
public function testSetType()
{
Cache::setType(Cache::TYPE_DISK);
@ -34,6 +40,12 @@ class SoapRequestTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(Cache::TYPE_NONE, Cache::getType());
}
public function testSetTypeBadValue()
{
$this->setExpectedException('InvalidArgumentException');
Cache::setType('foo');
}
public function testSetDirectory()
{
\vfsStream::setup('Fixtures');