diff vendor/psy/psysh/test/CodeCleaner/LoopContextPassTest.php @ 16:c2387f117808

Routine composer update
author Chris Cannam
date Tue, 10 Jul 2018 15:07:59 +0100
parents 5fb285c0d0e3
children
line wrap: on
line diff
--- a/vendor/psy/psysh/test/CodeCleaner/LoopContextPassTest.php	Thu Apr 26 11:26:54 2018 +0100
+++ b/vendor/psy/psysh/test/CodeCleaner/LoopContextPassTest.php	Tue Jul 10 15:07:59 2018 +0100
@@ -53,29 +53,6 @@
             ['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 @@
             ['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; } }'],
         ];
     }