Skip to content

Commit 14b2458

Browse files
Add test for #6589
1 parent 173afee commit 14b2458

3 files changed

Lines changed: 48 additions & 0 deletions

File tree

ChangeLog-13.1.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ All notable changes of the PHPUnit 13.1 release series are documented in this fi
77
### Fixed
88

99
* [#5860](https://github.com/sebastianbergmann/phpunit/issues/5860): PHP CLI `-d` settings are not forwarded to child processes for process isolation
10+
* [#6589](https://github.com/sebastianbergmann/phpunit/issues/6589): `dataSetAsStringWithData()` raises "float is not representable as int" warning for large floats in data sets
1011

1112
## [13.1.4] - 2026-04-15
1213

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
https://github.com/sebastianbergmann/phpunit/issues/6589
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--do-not-cache-result';
6+
$_SERVER['argv'][] = '--no-configuration';
7+
$_SERVER['argv'][] = __DIR__ . '/6589/Issue6589Test.php';
8+
$_SERVER['argv'][] = '--no-progress';
9+
10+
require_once __DIR__ . '/../../bootstrap.php';
11+
12+
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
13+
--EXPECTF--
14+
PHPUnit %s by Sebastian Bergmann and contributors.
15+
16+
Runtime: %s
17+
18+
Time: %s, Memory: %s
19+
20+
OK (1 test, 1 assertion)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php declare(strict_types=1);
2+
/*
3+
* This file is part of PHPUnit.
4+
*
5+
* (c) Sebastian Bergmann <sebastian@phpunit.de>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
namespace PHPUnit\TestFixture\Issue6589;
11+
12+
use PHPUnit\Framework\Attributes\DataProvider;
13+
use PHPUnit\Framework\TestCase;
14+
15+
final class Issue6589Test extends TestCase
16+
{
17+
public static function provider(): iterable
18+
{
19+
yield [9.223372036854776e18];
20+
}
21+
22+
#[DataProvider('provider')]
23+
public function testOne(float $value): void
24+
{
25+
$this->assertIsFloat($value);
26+
}
27+
}

0 commit comments

Comments
 (0)