From 4b95befdfe06bd7df74382dd6162dcd458852647 Mon Sep 17 00:00:00 2001 From: Vyacheslav Agafonov Date: Thu, 1 Dec 2011 12:01:57 +0400 Subject: [PATCH] replacement @expectedException to setExpectedException --- tests/logger/FileLoggerTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/logger/FileLoggerTest.php b/tests/logger/FileLoggerTest.php index 0d85434..69163a0 100644 --- a/tests/logger/FileLoggerTest.php +++ b/tests/logger/FileLoggerTest.php @@ -50,8 +50,8 @@ class FileLoggerTest extends PHPUnit_Framework_TestCase /** * @runInSeparateProcess - * @expectedException GeneralException - * @expectedExceptionMessage Could not open file /log.txt + * @expected Exception GeneralException + * @expected ExceptionMessage Could not open file /log.txt */ public function testCannotWrite() { @@ -59,6 +59,7 @@ class FileLoggerTest extends PHPUnit_Framework_TestCase define('DEBUG', true); } $conf = array('logger' => 'FileLogger', 'filepath' => '/log.txt'); + $this->setExpectedException('GeneralException', 'Could not open file /log.txt'); Config::set('Logger', $conf); $logger = Logger::getInstance()->log('new msg'); $this->assertFileNotExists('log.txt');