diff --git a/tests/Rules/PHPUnit/AssertSameMethodDifferentTypesRuleTest.php b/tests/Rules/PHPUnit/AssertSameMethodDifferentTypesRuleTest.php index d32ee2b..072603e 100644 --- a/tests/Rules/PHPUnit/AssertSameMethodDifferentTypesRuleTest.php +++ b/tests/Rules/PHPUnit/AssertSameMethodDifferentTypesRuleTest.php @@ -2,7 +2,6 @@ namespace PHPStan\Rules\PHPUnit; -use PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper; use PHPStan\Rules\Comparison\ImpossibleCheckTypeMethodCallRule; use PHPStan\Rules\Rule; @@ -14,7 +13,7 @@ class AssertSameMethodDifferentTypesRuleTest extends \PHPStan\Testing\RuleTestCa protected function getRule(): Rule { - return new ImpossibleCheckTypeMethodCallRule(new ImpossibleCheckTypeHelper($this->createBroker(), $this->getTypeSpecifier(), [], true), true, true); + return self::getContainer()->getByType(ImpossibleCheckTypeMethodCallRule::class); } public function testRule(): void @@ -70,6 +69,7 @@ public static function getAdditionalConfigFiles(): array { return [ __DIR__ . '/../../../extension.neon', + __DIR__ . '/../../../vendor/phpstan/phpstan-strict-rules/rules.neon', ]; } diff --git a/tests/Rules/PHPUnit/AssertSameStaticMethodDifferentTypesRuleTest.php b/tests/Rules/PHPUnit/AssertSameStaticMethodDifferentTypesRuleTest.php index 524f76e..e55d3e2 100644 --- a/tests/Rules/PHPUnit/AssertSameStaticMethodDifferentTypesRuleTest.php +++ b/tests/Rules/PHPUnit/AssertSameStaticMethodDifferentTypesRuleTest.php @@ -2,7 +2,6 @@ namespace PHPStan\Rules\PHPUnit; -use PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper; use PHPStan\Rules\Comparison\ImpossibleCheckTypeStaticMethodCallRule; use PHPStan\Rules\Rule; @@ -14,7 +13,7 @@ class AssertSameStaticMethodDifferentTypesRuleTest extends \PHPStan\Testing\Rule protected function getRule(): Rule { - return new ImpossibleCheckTypeStaticMethodCallRule(new ImpossibleCheckTypeHelper($this->createBroker(), $this->getTypeSpecifier(), [], true), true, true); + return self::getContainer()->getByType(ImpossibleCheckTypeStaticMethodCallRule::class); } public function testRule(): void @@ -54,6 +53,7 @@ public static function getAdditionalConfigFiles(): array { return [ __DIR__ . '/../../../extension.neon', + __DIR__ . '/../../../vendor/phpstan/phpstan-strict-rules/rules.neon', ]; }