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 15
15
16
16
use Doctrine \Deprecations \PHPUnit \VerifyDeprecations ;
17
17
use phpDocumentor \Guides \Nodes \ProjectNode ;
18
+ use PHPUnit \Framework \Attributes \WithoutErrorHandler ;
18
19
use PHPUnit \Framework \TestCase ;
19
20
20
21
final class CompilerContextTest extends TestCase
21
22
{
22
23
use VerifyDeprecations;
23
24
25
+ #[WithoutErrorHandler]
24
26
public function testTriggersDeprecationOnContextExtend (): void
25
27
{
26
28
$ this ->expectDeprecationWithIdentifier ('https://github.com/phpDocumentor/guides/issues/971 ' );
27
29
$ context = new class (new ProjectNode ()) extends CompilerContext{
28
30
};
29
31
}
30
32
33
+ #[WithoutErrorHandler]
31
34
public function testNoDeprecationOnNormalConstruct (): void
32
35
{
33
36
$ this ->expectNoDeprecationWithIdentifier ('https://github.com/phpDocumentor/guides/issues/971 ' );
Original file line number Diff line number Diff line change 3
3
<phpunit
4
4
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
5
xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.1/phpunit.xsd"
6
- bootstrap =" vendor/autoload .php"
6
+ bootstrap =" tests/bootstrap .php"
7
7
colors =" true"
8
8
beStrictAboutTestsThatDoNotTestAnything =" true"
9
9
beStrictAboutOutputDuringTests =" true"
10
10
beStrictAboutChangesToGlobalState =" true"
11
11
failOnNotice =" true"
12
12
failOnWarning =" true"
13
+ failOnDeprecation =" true"
13
14
displayDetailsOnTestsThatTriggerNotices =" true"
14
15
displayDetailsOnTestsThatTriggerWarnings =" true"
15
16
displayDetailsOnTestsThatTriggerErrors =" true"
17
+ displayDetailsOnTestsThatTriggerDeprecations =" true"
16
18
cacheDirectory =" .cache/.phpunit.cache"
17
19
requireCoverageMetadata =" false"
18
20
>
28
30
</testsuite >
29
31
</testsuites >
30
32
<coverage />
31
- <source >
33
+ <source ignoreSuppressionOfDeprecations = " true " >
32
34
<include >
33
35
<directory suffix =" .php" >packages/**/src</directory >
34
36
</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