replacement @expectedException to setExpectedException
This commit is contained in:
@ -27,11 +27,11 @@ class AutoloadBuilderTestVFS extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @TODO: Load->buildAutoload() - uses two paths - PATH . '/' . APP . '/src' and PATH . '/lib' those are not checked. Can couse error.
|
* @TODO: Load->buildAutoload() - uses two paths - PATH . '/' . APP . '/src' and PATH . '/lib' those are not checked. Can couse error.
|
||||||
* @expectedException UnexpectedValueException
|
|
||||||
* @expectedException PHPUnit_Framework_Error
|
|
||||||
*/
|
*/
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
|
$this->setExpectedException('UnexpectedValueException');
|
||||||
|
$this->setExpectedException('PHPUnit_Framework_Error');
|
||||||
if (!defined('PATH')) {
|
if (!defined('PATH')) {
|
||||||
define('PATH', realpath(dirname(__FILE__) . '/../../../..'));
|
define('PATH', realpath(dirname(__FILE__) . '/../../../..'));
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,6 @@ class ProfilerTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException GeneralException
|
|
||||||
* @expectedExceptionMessage Need to turn on DEBUG before use.
|
|
||||||
* @runInSeparateProcess
|
* @runInSeparateProcess
|
||||||
*/
|
*/
|
||||||
public function testGetInstaceNoDebug()
|
public function testGetInstaceNoDebug()
|
||||||
@ -41,6 +39,7 @@ class ProfilerTest extends PHPUnit_Framework_TestCase
|
|||||||
if (!defined('DEBUG')) {
|
if (!defined('DEBUG')) {
|
||||||
define('DEBUG', false);
|
define('DEBUG', false);
|
||||||
}
|
}
|
||||||
|
$this->setExpectedException('GeneralException', 'Need to turn on DEBUG before use.');
|
||||||
Profiler::getInstance();
|
Profiler::getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user