mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 01:04:09 +02:00
Bootstrap: Safe application start
Log exceptions and inform user if something goes wrong. refs #4625 refs #4592
This commit is contained in:
parent
afc302d45c
commit
9d4ca7739b
@ -41,6 +41,8 @@ use \Icinga\Application\Logger;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Test class for Logger
|
* Test class for Logger
|
||||||
|
*
|
||||||
|
* @backupStaticAttributes enabled
|
||||||
**/
|
**/
|
||||||
class LoggerTest extends \PHPUnit_Framework_TestCase
|
class LoggerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
@ -49,6 +51,7 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
|
|||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
date_default_timezone_set('GMT');
|
date_default_timezone_set('GMT');
|
||||||
|
Logger::reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testOverwrite()
|
public function testOverwrite()
|
||||||
@ -98,9 +101,7 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals('Testmessage '.json_encode(array('test1', 'test2')), $message);
|
$this->assertEquals('Testmessage '.json_encode(array('test1', 'test2')), $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @backupStaticAttributes enabled
|
|
||||||
*/
|
|
||||||
public function testLoggingOutput()
|
public function testLoggingOutput()
|
||||||
{
|
{
|
||||||
$cfg1 = new \Zend_Config(
|
$cfg1 = new \Zend_Config(
|
||||||
@ -126,9 +127,6 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @backupStaticAttributes enabled
|
|
||||||
*/
|
|
||||||
public function testLogQueuing()
|
public function testLogQueuing()
|
||||||
{
|
{
|
||||||
$cfg1 = new \Zend_Config(
|
$cfg1 = new \Zend_Config(
|
||||||
@ -153,9 +151,6 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($writer->events[1]['message'], 'Error');
|
$this->assertEquals($writer->events[1]['message'], 'Error');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @backupStaticAttributes enabled
|
|
||||||
*/
|
|
||||||
public function testDebugLogErrorCatching()
|
public function testDebugLogErrorCatching()
|
||||||
{
|
{
|
||||||
$cfg1 = new \Zend_Config(
|
$cfg1 = new \Zend_Config(
|
||||||
@ -179,9 +174,7 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
|
|||||||
$writers[0]->events[0]['message']
|
$writers[0]->events[0]['message']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* @backupStaticAttributes enabled
|
|
||||||
*/
|
|
||||||
public function testNotLoggedMessagesQueue()
|
public function testNotLoggedMessagesQueue()
|
||||||
{
|
{
|
||||||
$cfg1 = new \Zend_Config(
|
$cfg1 = new \Zend_Config(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user