8000 [PhpUnitBridge] Add test case for @expectedDeprecation annotation · symfony/symfony@dba1804 · GitHub
[go: up one dir, main page]

Skip to content

Commit dba1804

Browse files
committed
[PhpUnitBridge] Add test case for @expectedDeprecation annotation
1 parent 8e9aafc commit dba1804

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Bridge\PhpUnit\Tests;
13+
14+
use PHPUnit\Framework\TestCase;
15+
16+
final class ExpectedDeprecationAnnotationTest extends TestCase
17+
{
18+
/**
19+
* Do not remove this test in the next major versions.
20+
*
21+
* @group legacy
22+
*
23+
* @expectedDeprecation foo
24+
*/
25+
public function testOne()
26+
{
27+
@trigger_error('foo', E_USER_DEPRECATED);
28+
}
29+
30+
/**
31+
* Do not remove this test in the next major versions.
32+
*
33+
* @group legacy
34+
*
35+
* @expectedDeprecation foo
36+
* @expectedDeprecation bar
37+
*/
38+
public function testMany()
39+
{
40+
@trigger_error('foo', E_USER_DEPRECATED);
41+
@trigger_error('bar', E_USER_DEPRECATED);
42+
}
43+
}

0 commit comments

Comments
 (0)
0