File tree 1 file changed +36
-0
lines changed
src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Test DeprecationErrorHandler quiet on everything but self/direct deprecations
3
+ --FILE--
4
+ <?php
5
+
6
+ $ k = 'SYMFONY_DEPRECATIONS_HELPER ' ;
7
+ putenv ($ k .'= ' .$ _SERVER [$ k ] = $ _ENV [$ k ] = 'max[self]=0&max[direct]=0&quiet[]=unsilenced&quiet[]=indirect&quiet[]=other ' );
8
+ putenv ('ANSICON ' );
9
+ putenv ('ConEmuANSI ' );
10
+ putenv ('TERM ' );
11
+
12
+ $ vendor = __DIR__ ;
13
+ while (!file_exists ($ vendor .'/vendor ' )) {
14
+ $ vendor = dirname ($ vendor );
15
+ }
16
+ define ('PHPUNIT_COMPOSER_INSTALL ' , $ vendor .'/vendor/autoload.php ' );
17
+ require PHPUNIT_COMPOSER_INSTALL ;
18
+ require_once __DIR__ .'/../../bootstrap.php ' ;
19
+ require __DIR__ .'/fake_vendor/autoload.php ' ;
20
+ require __DIR__ .'/fake_vendor/acme/lib/deprecation_riddled.php ' ;
21
+ require __DIR__ .'/fake_vendor/acme/outdated-lib/outdated_file.php ' ;
22
+
23
+ ?>
24
+ --EXPECTF--
25
+ Unsilenced deprecation notices (3)
26
+
27
+ Remaining direct deprecation notices (2)
28
+
29
+ 1x: root deprecation
30
+
31
+ 1x: silenced bar deprecation
32
+ 1x in FooTestCase::testNonLegacyBar
33
+
34
+ Remaining indirect deprecation notices (1)
35
+
36
+ Legacy deprecation notices (2)
You can’t perform that action at this time.
0 commit comments