forked from phpstan/phpstan-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBug14396Test.php
More file actions
46 lines (38 loc) · 880 Bytes
/
Bug14396Test.php
File metadata and controls
46 lines (38 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php declare(strict_types = 1);
namespace PHPStan\Rules\Exceptions;
use PHPStan\Rules\Rule;
use PHPStan\Testing\RuleTestCase;
use PHPUnit\Framework\Attributes\RequiresPhp;
/**
* @extends RuleTestCase<MissingCheckedExceptionInFunctionThrowsRule>
*/
class Bug14396Test extends RuleTestCase
{
protected function getRule(): Rule
{
return new MissingCheckedExceptionInFunctionThrowsRule(
new MissingCheckedExceptionInThrowsCheck(new DefaultExceptionTypeResolver(
self::createReflectionProvider(),
[],
[],
[],
[],
)),
);
}
protected function shouldTreatPhpDocTypesAsCertain(): bool
{
return false;
}
#[RequiresPhp('>= 8.1')]
public function testRule(): void
{
$this->analyse([__DIR__ . '/data/bug-14396.php'], []);
}
public static function getAdditionalConfigFiles(): array
{
return [
__DIR__ . '/bug-14396.neon',
];
}
}