mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Merge pull request #3309 from Icinga/bugfix/localfilestoragetest-error-handler
LocalFileStorageTest: restore error_reporting() level and error handler
This commit is contained in:
commit
f905a978d8
@ -11,10 +11,16 @@ use Icinga\Test\BaseTestCase;
|
|||||||
|
|
||||||
class LocalFileStorageTest extends BaseTestCase
|
class LocalFileStorageTest extends BaseTestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
protected $oldErrorReportingLevel;
|
||||||
|
|
||||||
public function __construct($name = null, array $data = array(), $dataName = '')
|
public function __construct($name = null, array $data = array(), $dataName = '')
|
||||||
{
|
{
|
||||||
parent::__construct($name, $data, $dataName);
|
parent::__construct($name, $data, $dataName);
|
||||||
|
|
||||||
|
$this->oldErrorReportingLevel = error_reporting();
|
||||||
error_reporting(E_ALL | E_STRICT);
|
error_reporting(E_ALL | E_STRICT);
|
||||||
|
|
||||||
set_error_handler(function ($errno, $errstr, $errfile, $errline) {
|
set_error_handler(function ($errno, $errstr, $errfile, $errline) {
|
||||||
@ -35,6 +41,12 @@ class LocalFileStorageTest extends BaseTestCase
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function __destruct()
|
||||||
|
{
|
||||||
|
error_reporting($this->oldErrorReportingLevel);
|
||||||
|
restore_error_handler();
|
||||||
|
}
|
||||||
|
|
||||||
public function testGetIterator()
|
public function testGetIterator()
|
||||||
{
|
{
|
||||||
$lfs = new TemporaryLocalFileStorage();
|
$lfs = new TemporaryLocalFileStorage();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user