From bafe38ccf05b6a411ea16daba26394af294ef8fc Mon Sep 17 00:00:00 2001 From: Vyacheslav Agafonov Date: Thu, 1 Dec 2011 17:40:31 +0400 Subject: [PATCH] replacement @expectedException to setExpectedException --- tests/util/AutoloadBuilderTestVFS.php | 4 ++-- tests/util/profiler/ProfilerTest.php | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/util/AutoloadBuilderTestVFS.php b/tests/util/AutoloadBuilderTestVFS.php index ae31499..467a3bd 100644 --- a/tests/util/AutoloadBuilderTestVFS.php +++ b/tests/util/AutoloadBuilderTestVFS.php @@ -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. - * @expectedException UnexpectedValueException - * @expectedException PHPUnit_Framework_Error */ public function setUp() { + $this->setExpectedException('UnexpectedValueException'); + $this->setExpectedException('PHPUnit_Framework_Error'); if (!defined('PATH')) { define('PATH', realpath(dirname(__FILE__) . '/../../../..')); } diff --git a/tests/util/profiler/ProfilerTest.php b/tests/util/profiler/ProfilerTest.php index 442d06c..732ffd9 100644 --- a/tests/util/profiler/ProfilerTest.php +++ b/tests/util/profiler/ProfilerTest.php @@ -32,8 +32,6 @@ class ProfilerTest extends PHPUnit_Framework_TestCase } /** - * @expectedException GeneralException - * @expectedExceptionMessage Need to turn on DEBUG before use. * @runInSeparateProcess */ public function testGetInstaceNoDebug() @@ -41,6 +39,7 @@ class ProfilerTest extends PHPUnit_Framework_TestCase if (!defined('DEBUG')) { define('DEBUG', false); } + $this->setExpectedException('GeneralException', 'Need to turn on DEBUG before use.'); Profiler::getInstance(); }