From 887be75c5b8991f6c3580336de49a23a9e9eb673 Mon Sep 17 00:00:00 2001 From: dbrekelmans Date: Mon, 3 Jan 2022 17:09:03 +0100 Subject: [PATCH] Fix broken test --- tests/Rules/CallMethodRuleTest.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/Rules/CallMethodRuleTest.php b/tests/Rules/CallMethodRuleTest.php index 1836b31..4b8e362 100644 --- a/tests/Rules/CallMethodRuleTest.php +++ b/tests/Rules/CallMethodRuleTest.php @@ -5,6 +5,7 @@ use PHPStan\Php\PhpVersion; use PHPStan\Rules\FunctionCallParametersCheck; use PHPStan\Rules\Methods\CallMethodsRule; +use PHPStan\Rules\Methods\MethodCallCheck; use PHPStan\Rules\NullsafeCheck; use PHPStan\Rules\PhpDoc\UnresolvableTypeHelper; use PHPStan\Rules\Rule; @@ -16,14 +17,11 @@ class CallMethodRuleTest extends RuleTestCase { protected function getRule(): Rule { - $broker = $this->createBroker(); - $ruleLevelHelper = new RuleLevelHelper($broker, true, true, true, false); + $reflectionProvider = $this->createReflectionProvider(); + $ruleLevelHelper = new RuleLevelHelper($reflectionProvider, true, true, true, false); return new CallMethodsRule( - $broker, - new FunctionCallParametersCheck($ruleLevelHelper, new NullsafeCheck(), new PhpVersion(PHP_VERSION_ID), new UnresolvableTypeHelper(), true, false, false, false), - $ruleLevelHelper, - true, - true + new MethodCallCheck($reflectionProvider, $ruleLevelHelper, true, true), + new FunctionCallParametersCheck($ruleLevelHelper, new NullsafeCheck(), new PhpVersion(PHP_VERSION_ID), new UnresolvableTypeHelper(), true, false, false, false) ); }