Fixed tests with inc Config and Registry classes. Use LOGGING in logger tests.

This commit is contained in:
Alexander Demidov
2012-06-28 16:18:28 +04:00
parent cfd6536c5f
commit 7a26da1034
10 changed files with 32 additions and 14 deletions

View File

@ -44,7 +44,8 @@ class CliLoggerTest extends PHPUnit_Framework_TestCase
public function testLog()
{
Config::set('DEBUG', 1);
Config::set('LOGGING', 1);
Config::set('Logger', array('logger' => 'CliLogger'));
$logger = Logger::getInstance();
ob_start();
$logger->setPid(123);

View File

@ -33,6 +33,7 @@ class FileLoggerTest extends PHPUnit_Framework_TestCase
vfsStream::setup();
$root = vfsStream::create(array());
vfsStreamWrapper::setRoot($root);
Config::set('LOGGING', 1);
$this->conf = array('logger' => 'FileLogger', 'filepath' => vfsStream::url('root/log.txt'));
Config::set('Logger', $this->conf);
if ($root->hasChild('log.txt')) {