Moving setExpectedException
This commit is contained in:
@ -54,8 +54,10 @@ 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);
|
||||
|
||||
$this->setExpectedException('GeneralException', 'Could not open file /log.txt');
|
||||
|
||||
$logger = Logger::getInstance()->log('new msg');
|
||||
$this->assertFileNotExists('log.txt');
|
||||
}
|
||||
|
Reference in New Issue
Block a user