Browse Source

fix tests on 5.6

SpacePossum 5 years ago
parent
commit
088428f422
1 changed files with 37 additions and 37 deletions
  1. 37 37
      tests/Fixer/Phpdoc/PhpdocVarWithoutNameFixerTest.php

+ 37 - 37
tests/Fixer/Phpdoc/PhpdocVarWithoutNameFixerTest.php

@@ -372,40 +372,6 @@ EOF
             ],
             ],
             [
             [
                 '<?php
                 '<?php
-/**
- * Header
- */
-
-class A {} // for the candidate check
-
-/**
- * @var ClassLoader $loader
- */
-$loader = require __DIR__.\'/../vendor/autoload.php\';
-
-/**
- * @var \Foo\Bar $bar
- */
-$bar->doSomething(1);
-
-/**
- * @var $bar \Foo\Bar
- */
-$bar->doSomething(2);
-
-/**
- * @var User $bar
- */
-($bar = tmp())->doSomething(3);
-
-/**
- * @var User $bar
- */
-list($bar) = a();
-                ',
-            ],
-            [
-                '<?php
 class Foo
 class Foo
 {
 {
     /**
     /**
@@ -427,10 +393,10 @@ class Foo{}
      * @requires PHP 7.0
      * @requires PHP 7.0
      * @dataProvider provideFixVar70Cases
      * @dataProvider provideFixVar70Cases
      *
      *
-     * @param string $expected
-     * @param string $input
+     * @param string      $expected
+     * @param null|string $input
      */
      */
-    public function testFixVar70($expected, $input)
+    public function testFixVar70($expected, $input = null)
     {
     {
         $this->doTest($expected, $input);
         $this->doTest($expected, $input);
     }
     }
@@ -498,6 +464,40 @@ class Anon
 EOF
 EOF
                 ,
                 ,
             ],
             ],
+            [
+                '<?php
+/**
+ * Header
+ */
+
+class A {} // for the candidate check
+
+/**
+ * @var ClassLoader $loader
+ */
+$loader = require __DIR__.\'/../vendor/autoload.php\';
+
+/**
+ * @var \Foo\Bar $bar
+ */
+$bar->doSomething(1);
+
+/**
+ * @var $bar \Foo\Bar
+ */
+$bar->doSomething(2);
+
+/**
+ * @var User $bar
+ */
+($bar = tmp())->doSomething(3);
+
+/**
+ * @var User $bar
+ */
+list($bar) = a();
+                ',
+            ],
         ];
         ];
     }
     }
 }
 }