From 858df2f646ba405c624a2607dccb8a40c8f5e431 Mon Sep 17 00:00:00 2001 From: TomasVotruba Date: Sat, 23 Nov 2019 21:12:57 +0100 Subject: [PATCH] [Php 70] Fix this call on static for PHPUnit non-assert --- .../MethodCall/ThisCallOnStaticMethodToStaticCallRector.php | 4 +--- .../Fixture/skip_phpunit.php.inc | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/Php70/src/Rector/MethodCall/ThisCallOnStaticMethodToStaticCallRector.php b/packages/Php70/src/Rector/MethodCall/ThisCallOnStaticMethodToStaticCallRector.php index 990b16d6e7b2..d8b8e9a0301f 100644 --- a/packages/Php70/src/Rector/MethodCall/ThisCallOnStaticMethodToStaticCallRector.php +++ b/packages/Php70/src/Rector/MethodCall/ThisCallOnStaticMethodToStaticCallRector.php @@ -87,9 +87,7 @@ public function refactor(Node $node): ?Node } if ($this->isObjectType($node->var, TestCase::class)) { - if ($this->isName($node->name, 'assert*')) { - return null; - } + return null; } $className = $node->getAttribute(AttributeKey::CLASS_NAME); diff --git a/packages/Php70/tests/Rector/MethodCall/ThisCallOnStaticMethodToStaticCallRector/Fixture/skip_phpunit.php.inc b/packages/Php70/tests/Rector/MethodCall/ThisCallOnStaticMethodToStaticCallRector/Fixture/skip_phpunit.php.inc index cd9fc2e3b502..ad85d9c42ecb 100644 --- a/packages/Php70/tests/Rector/MethodCall/ThisCallOnStaticMethodToStaticCallRector/Fixture/skip_phpunit.php.inc +++ b/packages/Php70/tests/Rector/MethodCall/ThisCallOnStaticMethodToStaticCallRector/Fixture/skip_phpunit.php.inc @@ -9,5 +9,6 @@ class SkipPhpUnit extends TestCase public function testMe() { $this->assertTrue(True); + $this->markTestSkipped('uups'); } }