Skip to content

Commit 14ab44a

Browse files
committed
add failing test
1 parent 626d9aa commit 14ab44a

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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)

0 commit comments

Comments
 (0)