<?php

namespace Paraunit\Tests\Stub;

class FatalErrorTestStub extends BrokenTestBase implements BrokenTestInterface
{
    public function testBrokenTest()
    {
        ini_set('memory_limit', '2M');

        $arr = array();

        while(true) {
            $arr[] = "Allocated memory... allocated memory everywhere!";
        }
    }
}

<?php

namespace Paraunit\Tests\Stub;

class FatalErrorTestStub extends BrokenTestBase implements BrokenTestInterface
{
    /**
     * @throws \Exception
     */
    public function testBrokenTest()
    {
        $var = null;

        $var->nonExistendMethod();
    }
}

--- 
+++ 
@@ -4,13 +4,14 @@
 
 class FatalErrorTestStub extends BrokenTestBase implements BrokenTestInterface
 {
-    /**
-     * @throws \Exception
-     */
     public function testBrokenTest()
     {
-        $var = null;
+        ini_set('memory_limit', '2M');
 
-        $var->nonExistendMethod();
+        $arr = array();
+
+        while(true) {
+            $arr[] = "Allocated memory... allocated memory everywhere!";
+        }
     }
 }
Fix test for fatal error stub in HHVM and PHP7
