Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 151d71b

Browse files
Rewrite in backward compatibility compliant way
1 parent 82b919a commit 151d71b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎tests/Rules/PHPUnit/AssertSameMethodDifferentTypesRuleTest.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace PHPStan\Rules\PHPUnit;
44

5-
use PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper;
65
use PHPStan\Rules\Comparison\ImpossibleCheckTypeMethodCallRule;
76
use PHPStan\Rules\Rule;
87

@@ -14,7 +13,7 @@ class AssertSameMethodDifferentTypesRuleTest extends \PHPStan\Testing\RuleTestCa
1413

1514
protected function getRule(): Rule
1615
{
17-
return newImpossibleCheckTypeMethodCallRule(newImpossibleCheckTypeHelper($this->createBroker(), $this->getTypeSpecifier(), [], true), true, true);
16+
return self::getContainer()->getByType(ImpossibleCheckTypeMethodCallRule::class);
1817
}
1918

2019
public function testRule(): void
@@ -70,6 +69,7 @@ public static function getAdditionalConfigFiles(): array
7069
{
7170
return [
7271
__DIR__ . '/../../../extension.neon',
72+
__DIR__ . '/../../../vendor/phpstan/phpstan-strict-rules/rules.neon',
7373
];
7474
}
7575

‎tests/Rules/PHPUnit/AssertSameStaticMethodDifferentTypesRuleTest.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace PHPStan\Rules\PHPUnit;
44

5-
use PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper;
65
use PHPStan\Rules\Comparison\ImpossibleCheckTypeStaticMethodCallRule;
76
use PHPStan\Rules\Rule;
87

@@ -14,7 +13,7 @@ class AssertSameStaticMethodDifferentTypesRuleTest extends \PHPStan\Testing\Rule
1413

1514
protected function getRule(): Rule
1615
{
17-
return newImpossibleCheckTypeStaticMethodCallRule(newImpossibleCheckTypeHelper($this->createBroker(), $this->getTypeSpecifier(), [], true), true, true);
16+
return self::getContainer()->getByType(ImpossibleCheckTypeStaticMethodCallRule::class);
1817
}
1918

2019
public function testRule(): void
@@ -54,6 +53,7 @@ public static function getAdditionalConfigFiles(): array
5453
{
5554
return [
5655
__DIR__ . '/../../../extension.neon',
56+
__DIR__ . '/../../../vendor/phpstan/phpstan-strict-rules/rules.neon',
5757
];
5858
}
5959

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /