Browse Source

replacement @expectedException to setExpectedException

master
Vyacheslav Agafonov 13 years ago
parent
commit
0b11f62c21
  1. 9
      tests/redis/RedisDebugTest.php

9
tests/redis/RedisDebugTest.php

@ -25,12 +25,10 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase
return parent::run($result); return parent::run($result);
} }
/**
* @expectedException GeneralException
*/
public function testConstructException() public function testConstructException()
{ {
$this->setExpectedException('GeneralException');
$redisDebug = new RedisDebug('redis'); $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 * @runInSeparateProcess
*/ */
public function testCallUndefinedMethod() public function testCallUndefinedMethod()
@ -95,9 +92,11 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase
define('DEBUG', true); define('DEBUG', true);
} }
$this->setExpectedException('GeneralException', 'call_user_func_array() expects parameter 1 to be a valid callback');
$mock = $this->getMock('Redis', array('connect')); $mock = $this->getMock('Redis', array('connect'));
$redisDebug = new RedisDebug($mock); $redisDebug = new RedisDebug($mock);
$this->setExpectedException('GeneralException'); $this->setExpectedException('GeneralException');
$this->assertNull($redisDebug->nothing('localhost', 4322)); $this->assertNull($redisDebug->nothing('localhost', 4322));
} }
} }
Loading…
Cancel
Save