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);
}
/**
* @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));
}
}
Loading…
Cancel
Save