forked from phpstan/phpstan-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBug14534Test.php
More file actions
40 lines (33 loc) · 815 Bytes
/
Bug14534Test.php
File metadata and controls
40 lines (33 loc) · 815 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
<?php declare(strict_types = 1);
namespace PHPStan\Rules\Comparison;
use PHPStan\Analyser\RicherScopeGetTypeHelper;
use PHPStan\Rules\Rule;
use PHPStan\Testing\RuleTestCase;
use function array_merge;
/**
* @extends RuleTestCase<StrictComparisonOfDifferentTypesRule>
*/
class Bug14534Test extends RuleTestCase
{
protected function getRule(): Rule
{
return new StrictComparisonOfDifferentTypesRule(
self::getContainer()->getByType(RicherScopeGetTypeHelper::class),
new PossiblyImpureTipHelper(true),
true,
true,
true,
);
}
public function testRule(): void
{
$this->analyse([__DIR__ . '/data/bug-14534.php'], []);
}
public static function getAdditionalConfigFiles(): array
{
return array_merge(
parent::getAdditionalConfigFiles(),
[__DIR__ . '/bug-14534.neon'],
);
}
}