From bc7cad4977901bcf92fd9b999eafaba747f6a5ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Wed, 18 Sep 2024 22:48:49 +0200 Subject: [PATCH] Revert hidding warnings in examples --- CONTRIBUTING.md | 6 ------ tests/ExamplesTest.php | 9 +-------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0fb70ba3b..fe387e26d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,12 +43,6 @@ credentials in the connection string (i.e. `MONGODB_URI`) or set the Note that `MONGODB_USERNAME` and `MONGODB_PASSWORD` will override any credentials present in the connection string. -To run tests use the `phpunit` executable installed by Composer: - -```console -$ vendor/bin/phpunit -``` - ### Environment Variables The test suite references the following environment variables: diff --git a/tests/ExamplesTest.php b/tests/ExamplesTest.php index 7053e29f9..bca9e3a02 100644 --- a/tests/ExamplesTest.php +++ b/tests/ExamplesTest.php @@ -308,14 +308,7 @@ public function testWithTransaction(): void private function assertExampleOutput(string $file, string $expectedOutput): void { - // Hide deprecation messages - $level = error_reporting(E_ALL ^ E_DEPRECATED); - - try { - require $file; - } finally { - error_reporting($level); - } + require $file; $this->assertStringMatchesFormat($expectedOutput, $this->getActualOutputForAssertion()); }