187635d09SGreg Roach<?php 23976b470SGreg Roach 387635d09SGreg Roach/** 487635d09SGreg Roach * webtrees: online genealogy 5d11be702SGreg Roach * Copyright (C) 2023 webtrees development team 687635d09SGreg Roach * This program is free software: you can redistribute it and/or modify 787635d09SGreg Roach * it under the terms of the GNU General Public License as published by 887635d09SGreg Roach * the Free Software Foundation, either version 3 of the License, or 987635d09SGreg Roach * (at your option) any later version. 1087635d09SGreg Roach * This program is distributed in the hope that it will be useful, 1187635d09SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 1287635d09SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1387635d09SGreg Roach * GNU General Public License for more details. 1487635d09SGreg Roach * You should have received a copy of the GNU General Public License 1589f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>. 1687635d09SGreg Roach */ 17fcfa147eSGreg Roach 1887635d09SGreg Roachdeclare(strict_types=1); 1987635d09SGreg Roach 2087635d09SGreg Roachnamespace Fisharebest\Webtrees; 2187635d09SGreg Roach 22*202c018bSGreg Roachuse PHPUnit\Framework\Attributes\CoversClass; 23*202c018bSGreg Roach 2487635d09SGreg Roachuse function error_reporting; 2587635d09SGreg Roach 26*202c018bSGreg Roach#[CoversClass(Webtrees::class)] 27e5a6b4d4SGreg Roachclass WebtreesTest extends TestCase 2887635d09SGreg Roach{ 2987635d09SGreg Roach public function testInit(): void 3087635d09SGreg Roach { 3187635d09SGreg Roach error_reporting(0); 3287635d09SGreg Roach 33f397d0fdSGreg Roach $webtrees = new Webtrees(); 3400c45d23SGreg Roach $webtrees->bootstrap(); 3587635d09SGreg Roach 3687635d09SGreg Roach // webtrees sets the error reporting level. 375e933c21SGreg Roach self::assertNotSame(0, error_reporting()); 385e933c21SGreg Roach self::assertSame(Webtrees::ERROR_REPORTING, error_reporting()); 3987635d09SGreg Roach } 4087635d09SGreg Roach} 41