diff --git a/tests/cache/CacherTest.php b/tests/cache/CacherTest.php index 803d082..4bda1ce 100644 --- a/tests/cache/CacherTest.php +++ b/tests/cache/CacherTest.php @@ -27,12 +27,9 @@ class CacherTest extends PHPUnit_Framework_TestCase set_new_overload(array($this, 'newCallback')); } - /** - * @expectedException InitializationException - * @expectedExcepptionMessage Cache driver - */ public function testNotExtendsCache() { + $this->setExpectedException('InitializationException', 'Cache driver'); Cacher::get('Cacher'); } diff --git a/tests/cache/MemcacheCacheTest.php b/tests/cache/MemcacheCacheTest.php index c551ad2..379edff 100644 --- a/tests/cache/MemcacheCacheTest.php +++ b/tests/cache/MemcacheCacheTest.php @@ -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 */ public function testWrongConfig() { $config = array('some' => array()); + $this->setExpectedException('InitializationException', 'Configuration must have a'); $memcache = new MemcacheCache($config); }