diff --git a/redis/RedisDebug.php b/redis/RedisDebug.php index 5875210..692f0ea 100644 --- a/redis/RedisDebug.php +++ b/redis/RedisDebug.php @@ -25,12 +25,6 @@ class RedisDebug { $command = $this->r_implode(', ', $arguments); $profiler = Profiler::getInstance()->profilerCommand('Redis->' . $name, $command); - - $search = array_search($name, get_class_methods($this->redis)); - - if (empty($search)) { - throw new GeneralException('undefined method:'.$name); - } $data = call_user_func_array(array($this->redis, $name), $arguments); $profiler->end(); return $data; diff --git a/tests/redis/RedisDebugTest.php b/tests/redis/RedisDebugTest.php index 3794b1e..83642f7 100644 --- a/tests/redis/RedisDebugTest.php +++ b/tests/redis/RedisDebugTest.php @@ -103,7 +103,7 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase $mock = $this->getMock('Redis', array('connect')); $redisDebug = new RedisDebug($mock); - $this->setExpectedException('GeneralException'); + $this->setExpectedException('PHPUnit_Framework_Error', 'call_user_func_array() expects parameter 1 to be a valid callback, class \'Mock_Redis_'); $this->assertNull($redisDebug->nothing('localhost', 4322)); }