From 9d4ca7739b901161f82c43940618e6d67f759cb8 Mon Sep 17 00:00:00 2001 From: Marius Hein Date: Fri, 23 Aug 2013 09:57:32 +0200 Subject: [PATCH] Bootstrap: Safe application start Log exceptions and inform user if something goes wrong. refs #4625 refs #4592 --- .../library/Icinga/Application/LoggerTest.php | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/test/php/library/Icinga/Application/LoggerTest.php b/test/php/library/Icinga/Application/LoggerTest.php index 19c7560ee..2216006f7 100644 --- a/test/php/library/Icinga/Application/LoggerTest.php +++ b/test/php/library/Icinga/Application/LoggerTest.php @@ -41,6 +41,8 @@ use \Icinga\Application\Logger; /** * Test class for Logger + * + * @backupStaticAttributes enabled **/ class LoggerTest extends \PHPUnit_Framework_TestCase { @@ -49,6 +51,7 @@ class LoggerTest extends \PHPUnit_Framework_TestCase protected function setUp() { date_default_timezone_set('GMT'); + Logger::reset(); } public function testOverwrite() @@ -98,9 +101,7 @@ class LoggerTest extends \PHPUnit_Framework_TestCase $this->assertEquals('Testmessage '.json_encode(array('test1', 'test2')), $message); } - /** - * @backupStaticAttributes enabled - */ + public function testLoggingOutput() { $cfg1 = new \Zend_Config( @@ -126,9 +127,6 @@ class LoggerTest extends \PHPUnit_Framework_TestCase } - /** - * @backupStaticAttributes enabled - */ public function testLogQueuing() { $cfg1 = new \Zend_Config( @@ -153,9 +151,6 @@ class LoggerTest extends \PHPUnit_Framework_TestCase $this->assertEquals($writer->events[1]['message'], 'Error'); } - /** - * @backupStaticAttributes enabled - */ public function testDebugLogErrorCatching() { $cfg1 = new \Zend_Config( @@ -179,9 +174,7 @@ class LoggerTest extends \PHPUnit_Framework_TestCase $writers[0]->events[0]['message'] ); } - /** - * @backupStaticAttributes enabled - */ + public function testNotLoggedMessagesQueue() { $cfg1 = new \Zend_Config(