From 535a03e3a2cf74370104694d068ec911a9fdd72a Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Sun, 17 Apr 2022 13:05:40 +0200 Subject: [PATCH] Test files must have a namespace --- .../Rules/Methods/IllegalConstructorMethodCallRuleTest.php | 4 ++-- .../Rules/Methods/IllegalConstructorStaticCallRuleTest.php | 6 +++--- .../Methods/data/illegal-constructor-call-rule-test.php | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/PHPStan/Rules/Methods/IllegalConstructorMethodCallRuleTest.php b/tests/PHPStan/Rules/Methods/IllegalConstructorMethodCallRuleTest.php index a609162a707..0fc10a5e810 100644 --- a/tests/PHPStan/Rules/Methods/IllegalConstructorMethodCallRuleTest.php +++ b/tests/PHPStan/Rules/Methods/IllegalConstructorMethodCallRuleTest.php @@ -21,11 +21,11 @@ public function testMethods(): void $this->analyse([__DIR__ . '/data/illegal-constructor-call-rule-test.php'], [ [ 'Call to __construct() on an existing object is not allowed.', - 16, + 18, ], [ 'Call to __construct() on an existing object is not allowed.', - 58, + 60, ], ]); } diff --git a/tests/PHPStan/Rules/Methods/IllegalConstructorStaticCallRuleTest.php b/tests/PHPStan/Rules/Methods/IllegalConstructorStaticCallRuleTest.php index 6ec761d7a69..eb1232cb9af 100644 --- a/tests/PHPStan/Rules/Methods/IllegalConstructorStaticCallRuleTest.php +++ b/tests/PHPStan/Rules/Methods/IllegalConstructorStaticCallRuleTest.php @@ -21,15 +21,15 @@ public function testMethods(): void $this->analyse([__DIR__ . '/data/illegal-constructor-call-rule-test.php'], [ [ 'Static call to __construct() is only allowed on a parent class in the constructor.', - 29, + 31, ], [ 'Static call to __construct() is only allowed on a parent class in the constructor.', - 47, + 49, ], [ 'Static call to __construct() is only allowed on a parent class in the constructor.', - 48, + 50, ], ]); } diff --git a/tests/PHPStan/Rules/Methods/data/illegal-constructor-call-rule-test.php b/tests/PHPStan/Rules/Methods/data/illegal-constructor-call-rule-test.php index 8df51b725f2..73cc35e29d4 100644 --- a/tests/PHPStan/Rules/Methods/data/illegal-constructor-call-rule-test.php +++ b/tests/PHPStan/Rules/Methods/data/illegal-constructor-call-rule-test.php @@ -1,5 +1,7 @@