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
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $oldErrorReportingLevel;
|
||||
|
||||
public function __construct($name = null, array $data = array(), $dataName = '')
|
||||
{
|
||||
parent::__construct($name, $data, $dataName);
|
||||
|
||||
$this->oldErrorReportingLevel = error_reporting();
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
|
||||
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()
|
||||
{
|
||||
$lfs = new TemporaryLocalFileStorage();
|
||||
|
|
Loading…
Reference in New Issue