File tree 1 file changed +12
-1
lines changed 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 5
5
use Generator ;
6
6
7
7
use function bin2hex ;
8
+ use function error_reporting ;
8
9
use function getenv ;
9
10
use function putenv ;
10
11
use function random_bytes ;
11
12
use function sprintf ;
12
13
14
+ use const E_ALL ;
15
+ use const E_DEPRECATED ;
16
+
13
17
/** @runTestsInSeparateProcesses */
14
18
final class ExamplesTest extends FunctionalTestCase
15
19
{
@@ -304,7 +308,14 @@ public function testWithTransaction(): void
304
308
305
309
private function assertExampleOutput (string $ file , string $ expectedOutput ): void
306
310
{
307
- require $ file ;
311
+ // Hide deprecation messages
312
+ $ level = error_reporting (E_ALL ^ E_DEPRECATED );
313
+
314
+ try {
315
+ require $ file ;
316
+ } finally {
317
+ error_reporting ($ level );
318
+ }
308
319
309
320
$ this ->assertStringMatchesFormat ($ expectedOutput , $ this ->getActualOutputForAssertion ());
310
321
}
You can’t perform that action at this time.
0 commit comments