diff --git a/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php b/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php index 14af36d2102..96ccb832bca 100644 --- a/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php +++ b/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php @@ -144,7 +144,6 @@ public function configure(array $configuration): void 'is_numeric', 'is_object', 'is_real', - 'is_resource', 'is_scalar', 'is_string', ]); diff --git a/tests/Fixer/PhpUnit/PhpUnitDedicateAssertFixerTest.php b/tests/Fixer/PhpUnit/PhpUnitDedicateAssertFixerTest.php index f422d2faf34..590c809bc3e 100644 --- a/tests/Fixer/PhpUnit/PhpUnitDedicateAssertFixerTest.php +++ b/tests/Fixer/PhpUnit/PhpUnitDedicateAssertFixerTest.php @@ -159,7 +159,7 @@ public function provideTestFixCases(): \Generator ], ]; - foreach (['array', 'bool', 'callable', 'double', 'float', 'int', 'integer', 'long', 'numeric', 'object', 'resource', 'real', 'scalar', 'string'] as $type) { + foreach (['array', 'bool', 'callable', 'double', 'float', 'int', 'integer', 'long', 'numeric', 'object', 'real', 'scalar', 'string'] as $type) { yield [ self::generateTest(sprintf('$this->assertInternalType(\'%s\', $a);', $type)), self::generateTest(sprintf('$this->assertTrue(is_%s($a));', $type)), @@ -307,6 +307,13 @@ public function provideNotFixCases(): \Generator yield 'not in class' => [ ' [ + self::generateTest('self::assertTrue(is_resource($resource));'), + ]; } public function testInvalidConfig(): void