Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PhpUnitBridge] Add test case for @expectedDeprecation annotation
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
src/Symfony/Bridge/PhpUnit/Tests/ExpectedDeprecationAnnotationTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Bridge\PhpUnit\Tests; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
final class ExpectedDeprecationAnnotationTest extends TestCase | ||
{ | ||
/** | ||
* Do not remove this test in the next major versions. | ||
* | ||
* @group legacy | ||
* | ||
* @expectedDeprecation foo | ||
*/ | ||
public function testOne() | ||
{ | ||
@trigger_error('foo', E_USER_DEPRECATED); | ||
} | ||
|
||
/** | ||
* Do not remove this test in the next major versions. | ||
* | ||
* @group legacy | ||
* | ||
* @expectedDeprecation foo | ||
* @expectedDeprecation bar | ||
*/ | ||
public function testMany() | ||
{ | ||
@trigger_error('foo', E_USER_DEPRECATED); | ||
@trigger_error('bar', E_USER_DEPRECATED); | ||
} | ||
} |