Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / psy / psysh / test / CodeCleaner / LoopContextPassTest.php
index 057d0c950e08ff26fa25eb07a5462029cd6ce196..3b363068334a5e95801aba7c3651a7a3a4566d09 100644 (file)
@@ -53,29 +53,6 @@ class LoopContextPassTest extends CodeCleanerTestCase
             ['while (true) { break 2; }'],
             ['while (true) { continue 2; }'],
 
-            // invalid in 5.4+ because they're floats
-            // ... in 5.3 because the number is too big
-            ['while (true) { break 2.0; }'],
-            ['while (true) { continue 2.0; }'],
-
-            // and once with nested loops, just for good measure
-            ['while (true) { while (true) { break 3; } }'],
-            ['while (true) { while (true) { continue 3; } }'],
-        ];
-    }
-
-    /**
-     * @dataProvider invalidPHP54Statements
-     * @expectedException \Psy\Exception\FatalErrorException
-     */
-    public function testPHP54ProcessStatementFails($code)
-    {
-        $this->parseAndTraverse($code);
-    }
-
-    public function invalidPHP54Statements()
-    {
-        return [
             // In PHP 5.4+, only positive literal integers are allowed
             ['while (true) { break $n; }'],
             ['while (true) { continue $n; }'],
@@ -87,6 +64,12 @@ class LoopContextPassTest extends CodeCleanerTestCase
             ['while (true) { continue -1; }'],
             ['while (true) { break 1.0; }'],
             ['while (true) { continue 1.0; }'],
+            ['while (true) { break 2.0; }'],
+            ['while (true) { continue 2.0; }'],
+
+            // and once with nested loops, just for good measure
+            ['while (true) { while (true) { break 3; } }'],
+            ['while (true) { while (true) { continue 3; } }'],
         ];
     }