Browse Source

replacement @expectedException to setExpectedException

master
Vyacheslav Agafonov 13 years ago
parent
commit
4b95befdfe
  1. 5
      tests/logger/FileLoggerTest.php

5
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');

Loading…
Cancel
Save