Browse Source

minor #5902 Remove references to PHP 7.0 in tests (only removing lines) (kubawerlos)

This PR was merged into the 3.0 branch.

Discussion
----------

Remove references to PHP 7.0 in tests (only removing lines)

This is first part of removing PHP 7.0 references from code - with only removing obvious stuff, to make easy review.

This touches 50 files, so more interesting changes will be in separate PR.

Most of the fixes are when having:
```
testFix
provideFixCases
testFix70
provideFix70Cases
```

is removing `testFix70` and merging the providers.

Commits
-------

8a86d4897 Remove references to PHP 7.0 in tests
Dariusz Ruminski 3 years ago
parent
commit
1127221c0c

+ 0 - 1
tests/Fixer/Alias/ArrayPushFixerTest.php

@@ -27,7 +27,6 @@ final class ArrayPushFixerTest extends AbstractFixerTestCase
 {
     /**
      * @dataProvider provideFixCases
-     * @requires PHP 7.0
      */
     public function testFix(string $expected, ?string $input = null): void
     {

+ 0 - 17
tests/Fixer/Basic/BracesFixerTest.php

@@ -2966,23 +2966,6 @@ if ($a) { /* */ /* */ /* */ /* */ /* */
 ?><?php ++$a;
 } ?>',
             ],
-        ];
-    }
-
-    /**
-     * @dataProvider provideFixCommentBeforeBrace70Cases
-     * @requires PHP 7.0
-     */
-    public function testFixCommentBeforeBrace70(string $expected, ?string $input = null, array $configuration = []): void
-    {
-        $this->fixer->configure($configuration);
-
-        $this->doTest($expected, $input);
-    }
-
-    public function provideFixCommentBeforeBrace70Cases()
-    {
-        return [
             [
                 '<?php
     $foo = new class ($a) extends Foo implements Bar { // foo

+ 0 - 1
tests/Fixer/Basic/NonPrintableCharacterFixerTest.php

@@ -109,7 +109,6 @@ echo "Hello'.pack('H*', 'e280af').'World'.pack('H*', 'c2a0').'!";',
 
     /**
      * @dataProvider provideFixWithEscapeSequencesInStringsCases
-     * @requires PHP 7.0
      */
     public function testFixWithEscapeSequencesInStrings(string $expected, ?string $input = null): void
     {

+ 0 - 15
tests/Fixer/Casing/LowercaseStaticReferenceFixerTest.php

@@ -142,21 +142,6 @@ final class LowercaseStaticReferenceFixerTest extends AbstractFixerTestCase
             [
                 '<?php namespace Parent\Foo;',
             ],
-        ];
-    }
-
-    /**
-     * @requires PHP 7.0
-     * @dataProvider provideFix70Cases
-     */
-    public function testFix70(string $expected, ?string $input = null): void
-    {
-        $this->doTest($expected, $input);
-    }
-
-    public function provideFix70Cases()
-    {
-        return [
             [
                 '<?php class Foo extends Bar { public function baz() : self {} }',
                 '<?php class Foo extends Bar { public function baz() : Self {} }',

+ 0 - 33
tests/Fixer/Casing/NativeFunctionTypeDeclarationCasingFixerTest.php

@@ -99,39 +99,6 @@ function Foo(INTEGER $a) {}
                     B\String\C $y
                 ) {}',
             ],
-        ];
-    }
-
-    /**
-     * @requires PHP <7.0
-     *
-     * @dataProvider provideFixPre70Cases
-     */
-    public function testFixPre70(string $expected): void
-    {
-        $this->doTest($expected);
-    }
-
-    public function provideFixPre70Cases()
-    {
-        return [
-            ['<?php function Foo(BOOL $A, FLOAT $B, INT $C, STRING $D, ITERABLE $E, VOID $F, OBJECT $o) {}'],
-            ['<?php class Foo { public function Foo(\INT $a) {}}'],
-        ];
-    }
-
-    /**
-     * @dataProvider provideFix70Cases
-     * @requires PHP 7.0
-     */
-    public function testFix70(string $expected, ?string $input = null): void
-    {
-        $this->doTest($expected, $input);
-    }
-
-    public function provideFix70Cases()
-    {
-        return [
             [
                 '<?php final class Foo1 { final public function Foo(bool $A, float $B, int $C, string $D): int {} }',
                 '<?php final class Foo1 { final public function Foo(BOOL $A, FLOAT $B, INT $C, STRING $D): INT {} }',

+ 0 - 2
tests/Fixer/ClassNotation/ClassDefinitionFixerTest.php

@@ -50,8 +50,6 @@ final class ClassDefinitionFixerTest extends AbstractFixerTestCase
      * @param array<string, bool> $config
      *
      * @dataProvider provideAnonymousClassesCases
-     *
-     * @requires PHP 7.0
      */
     public function testFixingAnonymousClasses(string $expected, string $input, array $config = []): void
     {

+ 0 - 18
tests/Fixer/ClassNotation/FinalClassFixerTest.php

@@ -72,24 +72,6 @@ final class FinalClassFixerTest extends AbstractFixerTestCase
                 '<?php /** @internal Map my app to an @Entity */ final class MyMapper {}',
                 '<?php /** @internal Map my app to an @Entity */ class MyMapper {}',
             ],
-        ];
-    }
-
-    /**
-     * @param string      $expected PHP source code
-     * @param null|string $input    PHP source code
-     *
-     * @dataProvider provideFix70Cases
-     * @requires PHP 7.0
-     */
-    public function testFix70(string $expected, ?string $input = null): void
-    {
-        $this->doTest($expected, $input);
-    }
-
-    public function provideFix70Cases()
-    {
-        return [
             ['<?php $anonymClass = new class {};'],
         ];
     }

+ 0 - 1
tests/Fixer/ClassNotation/FinalInternalClassFixerTest.php

@@ -276,7 +276,6 @@ class B{}
      * @param string      $expected PHP source code
      * @param null|string $input    PHP source code
      *
-     * @requires PHP 7.0
      * @dataProvider provideAnonymousClassesCases
      */
     public function testAnonymousClassesCases(string $expected, ?string $input = null): void

+ 0 - 18
tests/Fixer/ClassNotation/FinalPublicMethodForAbstractClassFixerTest.php

@@ -100,24 +100,6 @@ final class FinalPublicMethodForAbstractClassFixerTest extends AbstractFixerTest
                     abstract public static function bar();
                 }',
             ],
-        ];
-    }
-
-    /**
-     * @param string      $expected PHP source code
-     * @param null|string $input    PHP source code
-     *
-     * @dataProvider provideFix70Cases
-     * @requires PHP 7.0
-     */
-    public function testFix70(string $expected, ?string $input = null): void
-    {
-        $this->doTest($expected, $input);
-    }
-
-    public function provideFix70Cases()
-    {
-        return [
             'anonymous-class' => [
                 sprintf(
                     '<?php abstract class MyClass { private function test() { $a = new class { %s }; } }',

+ 0 - 15
tests/Fixer/ClassNotation/NoNullPropertyInitializationFixerTest.php

@@ -243,21 +243,6 @@ null;#13
             [
                 '<?php function foo() { static $foo = null; }',
             ],
-        ];
-    }
-
-    /**
-     * @requires PHP 7.0
-     * @dataProvider providePhp70Cases
-     */
-    public function testFixPhp70(string $expected, ?string $input = null): void
-    {
-        $this->doTest($expected, $input);
-    }
-
-    public function providePhp70Cases()
-    {
-        return [
             [
                 '<?php new class () { public $bar; };',
                 '<?php new class () { public $bar = null; };',

Some files were not shown because too many files changed in this diff