Skip to content

Commit a630c7b

Browse files
committed
fix tests
1 parent b97e8ee commit a630c7b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"php": "^7.1 || ^8.0",
14-
"phpstan/phpstan": "^0.10 | ^0.11 | ^0.12 | ^1.0",
14+
"phpstan/phpstan": "^1.0",
1515
"thecodingmachine/safe": "^1.0"
1616
},
1717
"require-dev": {

tests/Rules/CallMethodRuleTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
namespace TheCodingMachine\Safe\PHPStan\Rules;
44

5+
use PHPStan\Php\PhpVersion;
56
use PHPStan\Rules\FunctionCallParametersCheck;
67
use PHPStan\Rules\Methods\CallMethodsRule;
8+
use PHPStan\Rules\NullsafeCheck;
9+
use PHPStan\Rules\PhpDoc\UnresolvableTypeHelper;
710
use PHPStan\Rules\Rule;
811
use PHPStan\Rules\RuleLevelHelper;
912
use PHPStan\Testing\RuleTestCase;
@@ -14,10 +17,10 @@ class CallMethodRuleTest extends RuleTestCase
1417
protected function getRule(): Rule
1518
{
1619
$broker = $this->createBroker();
17-
$ruleLevelHelper = new RuleLevelHelper($broker, true, true, true);
20+
$ruleLevelHelper = new RuleLevelHelper($broker, true, true, true, false);
1821
return new CallMethodsRule(
1922
$broker,
20-
new FunctionCallParametersCheck($ruleLevelHelper, true, true, true, true),
23+
new FunctionCallParametersCheck($ruleLevelHelper, new NullsafeCheck(), new PhpVersion(PHP_VERSION_ID), new UnresolvableTypeHelper(), true, false, false, false),
2124
$ruleLevelHelper,
2225
true,
2326
true

0 commit comments

Comments
 (0)