Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/phpunit-bridge/Tests/DeprecationErrorHandler/regexp.phpt @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 --TEST-- | |
2 Test DeprecationErrorHandler in weak mode | |
3 --FILE-- | |
4 <?php | |
5 | |
6 putenv('SYMFONY_DEPRECATIONS_HELPER=/foo/'); | |
7 putenv('ANSICON'); | |
8 putenv('ConEmuANSI'); | |
9 putenv('TERM'); | |
10 | |
11 $vendor = __DIR__; | |
12 while (!file_exists($vendor.'/vendor')) { | |
13 $vendor = dirname($vendor); | |
14 } | |
15 define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php'); | |
16 require PHPUNIT_COMPOSER_INSTALL; | |
17 require_once __DIR__.'/../../bootstrap.php'; | |
18 | |
19 @trigger_error('root deprecation', E_USER_DEPRECATED); | |
20 | |
21 class FooTestCase | |
22 { | |
23 public function testLegacyFoo() | |
24 { | |
25 @trigger_error('silenced foo deprecation', E_USER_DEPRECATED); | |
26 trigger_error('unsilenced foo deprecation', E_USER_DEPRECATED); | |
27 } | |
28 } | |
29 | |
30 $foo = new FooTestCase(); | |
31 $foo->testLegacyFoo(); | |
32 | |
33 ?> | |
34 --EXPECTF-- | |
35 Legacy deprecation triggered by FooTestCase::testLegacyFoo: | |
36 silenced foo deprecation | |
37 Stack trace: | |
38 #%A(%d): FooTestCase->testLegacyFoo() | |
39 #%d {main} | |
40 |