. */ declare(strict_types=1); namespace Fisharebest\Webtrees; use function date_default_timezone_get; use function date_default_timezone_set; use function error_reporting; /** * Test the Webtrees class */ class WebtreesTest extends \Fisharebest\Webtrees\TestCase { /** * @covers \Fisharebest\Webtrees\Webtrees::init * @return void */ public function testInit(): void { date_default_timezone_set('Europe/London'); error_reporting(0); Webtrees::init(); // webtrees always runs in UTC (and converts to local time on demand). $this->assertSame('UTC', date_default_timezone_get()); // webtrees sets the error reporting level. $this->assertNotSame(0, error_reporting()); $this->assertSame(Webtrees::ERROR_REPORTING, error_reporting()); } }