Ignore the timezone configured in php.ini, better cleanup after feature tests

This commit is contained in:
Igor Scheller 2022-12-14 00:53:43 +01:00 committed by Michael Weimann
parent d1b7b6886e
commit 559517e017
2 changed files with 15 additions and 1 deletions

View File

@ -286,7 +286,7 @@ return [
'max_freeloadable_shifts' => env('MAX_FREELOADABLE_SHIFTS', 2),
// Local timezone
'timezone' => env('TIMEZONE', ini_get('date.timezone') ?: 'Europe/Berlin'),
'timezone' => env('TIMEZONE', 'Europe/Berlin'),
// Multiply 'night shifts' and freeloaded shifts (start or end between 2 and 6 exclusive) by 2
'night_shifts' => [

View File

@ -11,4 +11,18 @@ abstract class ApplicationFeatureTest extends TestCase
$_SERVER['HTTP_HOST'] = 'foo.bar';
require __DIR__ . '/../../includes/engelsystem.php';
}
/**
* Undo the changes done by the ConfigureEnvironmentServiceProvider
*/
protected function tearDown(): void
{
parent::tearDown();
ini_set('display_errors', true);
error_reporting(E_ALL);
ini_set('date.timezone', 'UTC');
date_default_timezone_set('UTC');
}
}