Moving setExpectedException

This commit is contained in:
Vyacheslav Agafonov
2011-12-02 12:25:47 +04:00
parent 1f1551aea1
commit 0fda3de8b5
16 changed files with 38 additions and 29 deletions

View File

@ -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');
}