replacement @expectedException to setExpectedException
This commit is contained in:
@ -25,12 +25,10 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
return parent::run($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException GeneralException
|
||||
*/
|
||||
|
||||
public function testConstructException()
|
||||
{
|
||||
$this->setExpectedException('GeneralException');
|
||||
$redisDebug = new RedisDebug('redis');
|
||||
}
|
||||
|
||||
@ -86,7 +84,6 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedExceptionMessage call_user_func_array() expects parameter 1 to be a valid callback
|
||||
* @runInSeparateProcess
|
||||
*/
|
||||
public function testCallUndefinedMethod()
|
||||
@ -95,9 +92,11 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase
|
||||
define('DEBUG', true);
|
||||
}
|
||||
|
||||
$this->setExpectedException('GeneralException', 'call_user_func_array() expects parameter 1 to be a valid callback');
|
||||
$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