Skip to content

Commit

Permalink
created regression test for #5614
Browse files Browse the repository at this point in the history
  • Loading branch information
ptomulik authored and sebastianbergmann committed Dec 12, 2023
1 parent 4272cbd commit 43a79f9
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/end-to-end/regression/5614.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--TEST--
https://github.com/sebastianbergmann/phpunit/issues/5614
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
$_SERVER['argv'][] = '--no-configuration';
$_SERVER['argv'][] = __DIR__ . '/5614/Issue5614Test.php';

require_once __DIR__ . '/../../bootstrap.php';
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.

Runtime: %s

. 1 / 1 (100%)

Time: %s, Memory: %s MB

OK (1 test, 1 assertion)
28 changes: 28 additions & 0 deletions tests/end-to-end/regression/5614/Issue5614Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\TestFixture\Issue5614;

use PHPUnit\Framework\TestCase;

final class Issue5614Test extends TestCase
{
public static function provideRecursiveArray(): iterable {
$array = [];
$array[0] = &$array;
yield [$array];
}

/**
* @dataProvider provideRecursiveArray
*/
public function testRecursiveArray(array $array): void {
$this->assertTrue(true);
}
}

0 comments on commit 43a79f9

Please sign in to comment.