diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2025-06-17 00:13:26 +0100 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2025-06-24 17:08:41 +0100 |
| commit | 374d8596feba15ec1c90f2fe2a4a02a1613a6e78 (patch) | |
| tree | e8a22c322b34274a2010fea6c626850c29f800c3 /tests/app/Services | |
| parent | 42c8c31daf4b42a02cd3be82cab55dea15379874 (diff) | |
| download | webtrees-374d8596feba15ec1c90f2fe2a4a02a1613a6e78.tar.gz webtrees-374d8596feba15ec1c90f2fe2a4a02a1613a6e78.tar.bz2 webtrees-374d8596feba15ec1c90f2fe2a4a02a1613a6e78.zip | |
Add final tests for PhpService
Diffstat (limited to 'tests/app/Services')
| -rw-r--r-- | tests/app/Services/PhpServiceTest.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/app/Services/PhpServiceTest.php b/tests/app/Services/PhpServiceTest.php index 7a9c7747ca..961c291610 100644 --- a/tests/app/Services/PhpServiceTest.php +++ b/tests/app/Services/PhpServiceTest.php @@ -21,6 +21,7 @@ namespace Fisharebest\Webtrees\Services; use Fisharebest\Webtrees\TestCase; use PHPUnit\Framework\Attributes\CoversClass; +use RuntimeException; use function extension_loaded; use function ini_get; @@ -67,4 +68,14 @@ class PhpServiceTest extends TestCase $php_service->uploadMaxFilesize() ); } + + public function testIniGetInvalidSetting(): void + { + $php_service = new PhpService(); + + $this->expectException(RuntimeException::class); + $this->expectExceptionMessage('Cannot read PHP configuration: foo_bar'); + + $php_service->iniGet(option: 'foo_bar'); + } } |
