<?php

declare(strict_types=1);

namespace Tests\Stub;

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

        $arr = [];

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

<?php

declare(strict_types=1);

namespace Tests\Stub;

class FatalErrorTestStub extends BrokenTestBase implements BrokenTestInterface
{
    public function testBrokenTest(): void
    {
        $foo = new class() implements \Serializable {
        };

        $message = 'This assertion should not happen: ' . json_encode($foo);

        self::assertTrue(true, $message);
    }
}

Improve stub to avoid memory leak
Improve stub to avoid memory leak
