Closed massadm closed 6 years ago
Thanks, though I'm not sure how to benefit from this information :)
I suggest adding the normalization of precision with ini_set() before the tests.
Like this
if (version_compare(phpversion(), '7.1', '>=')) {
ini_set( 'precision', 14 );
ini_set( 'serialize_precision', -1 );
}
elseif (version_compare(phpversion(), '7.0', '>=')) {
???
}
elseif (version_compare(phpversion(), '5.3.5', '>=')) {
ini_set( 'precision', 14 );
ini_set( 'serialize_precision', 17 );
}
Backup settings then override then run tests then restore settings back.
Not a bug! Depends on the PHP configuration.
php -i | grep "PHP Version\|precision"
phpunit --filter testNameMapper ./tests/src/PHPUnit/Example/ExampleTest.php
php -i | grep "PHP Version\|precision"
phpunit --filter testNameMapper ./tests/src/PHPUnit/Example/ExampleTest.php
Just FYI. Have a nice day!