replacement @expectedException to setExpectedException
This commit is contained in:
5
tests/cache/CacherTest.php
vendored
5
tests/cache/CacherTest.php
vendored
@ -27,12 +27,9 @@ class CacherTest extends PHPUnit_Framework_TestCase
|
|||||||
set_new_overload(array($this, 'newCallback'));
|
set_new_overload(array($this, 'newCallback'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @expectedException InitializationException
|
|
||||||
* @expectedExcepptionMessage Cache driver
|
|
||||||
*/
|
|
||||||
public function testNotExtendsCache()
|
public function testNotExtendsCache()
|
||||||
{
|
{
|
||||||
|
$this->setExpectedException('InitializationException', 'Cache driver');
|
||||||
Cacher::get('Cacher');
|
Cacher::get('Cacher');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
3
tests/cache/MemcacheCacheTest.php
vendored
3
tests/cache/MemcacheCacheTest.php
vendored
@ -37,13 +37,12 @@ class MemcacheCacheTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException InitializationException
|
|
||||||
* @expectedExceptionMessage Configuration must have a
|
|
||||||
* @TODO: MemcacheCache::__construct - empty config array passes with no host params
|
* @TODO: MemcacheCache::__construct - empty config array passes with no host params
|
||||||
*/
|
*/
|
||||||
public function testWrongConfig()
|
public function testWrongConfig()
|
||||||
{
|
{
|
||||||
$config = array('some' => array());
|
$config = array('some' => array());
|
||||||
|
$this->setExpectedException('InitializationException', 'Configuration must have a');
|
||||||
|
|
||||||
$memcache = new MemcacheCache($config);
|
$memcache = new MemcacheCache($config);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user