added setExpectedException and check empty($search)
This commit is contained in:
@ -22,6 +22,7 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase
|
||||
public function run(PHPUnit_Framework_TestResult $result = NULL)
|
||||
{
|
||||
$this->setPreserveGlobalState(false);
|
||||
|
||||
return parent::run($result);
|
||||
}
|
||||
|
||||
@ -85,7 +86,6 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException GeneralException
|
||||
* @expectedExceptionMessage call_user_func_array() expects parameter 1 to be a valid callback
|
||||
* @runInSeparateProcess
|
||||
*/
|
||||
@ -94,8 +94,10 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', true);
|
||||
}
|
||||
|
||||
$mock = $this->getMock('Redis', array('connect'));
|
||||
$redisDebug = new RedisDebug($mock);
|
||||
$this->setExpectedException('GeneralException');
|
||||
$this->assertNull($redisDebug->nothing('localhost', 4322));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user