File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
packages/guides/tests/unit/Compiler Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1515
1616use Doctrine \Deprecations \PHPUnit \VerifyDeprecations ;
1717use phpDocumentor \Guides \Nodes \ProjectNode ;
18+ use PHPUnit \Framework \Attributes \WithoutErrorHandler ;
1819use PHPUnit \Framework \TestCase ;
1920
2021final class CompilerContextTest extends TestCase
2122{
2223 use VerifyDeprecations;
2324
25+ #[WithoutErrorHandler]
2426 public function testTriggersDeprecationOnContextExtend (): void
2527 {
2628 $ this ->expectDeprecationWithIdentifier ('https://github.com/phpDocumentor/guides/issues/971 ' );
2729 $ context = new class (new ProjectNode ()) extends CompilerContext{
2830 };
2931 }
3032
33+ #[WithoutErrorHandler]
3134 public function testNoDeprecationOnNormalConstruct (): void
3235 {
3336 $ this ->expectNoDeprecationWithIdentifier ('https://github.com/phpDocumentor/guides/issues/971 ' );
Original file line number Diff line number Diff line change 33<phpunit
44 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
55 xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.1/phpunit.xsd"
6- bootstrap =" vendor/autoload .php"
6+ bootstrap =" tests/bootstrap .php"
77 colors =" true"
88 beStrictAboutTestsThatDoNotTestAnything =" true"
99 beStrictAboutOutputDuringTests =" true"
1010 beStrictAboutChangesToGlobalState =" true"
1111 failOnNotice =" true"
1212 failOnWarning =" true"
13+ failOnDeprecation =" true"
1314 displayDetailsOnTestsThatTriggerNotices =" true"
1415 displayDetailsOnTestsThatTriggerWarnings =" true"
1516 displayDetailsOnTestsThatTriggerErrors =" true"
17+ displayDetailsOnTestsThatTriggerDeprecations =" true"
1618 cacheDirectory =" .cache/.phpunit.cache"
1719 requireCoverageMetadata =" false"
1820>
2830 </testsuite >
2931 </testsuites >
3032 <coverage />
31- <source >
33+ <source ignoreSuppressionOfDeprecations = " true " >
3234 <include >
3335 <directory suffix =" .php" >packages/**/src</directory >
3436 </include >
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ use Doctrine \Deprecations \Deprecation ;
6+
7+ require_once dirname (__DIR__ ) . '/vendor/autoload.php ' ;
8+
9+ Deprecation::enableWithTriggerError ();
10+ Deprecation::withoutDeduplication ();
You can’t perform that action at this time.
0 commit comments