X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FCRM%2FUtils%2FNumberTest.php;h=ea7af8ddabfc87a6b5f815a75143addade667f8a;hb=d111a110d99397070c6f3ee38c9f1525c30eb767;hp=9804bce4efc8b2038bf6d0b74b8c705d5029f3c2;hpb=69a16c055166741bb5e137ddb097578bcc83b8ea;p=civicrm-core.git diff --git a/tests/phpunit/CRM/Utils/NumberTest.php b/tests/phpunit/CRM/Utils/NumberTest.php index 9804bce4ef..ea7af8ddab 100644 --- a/tests/phpunit/CRM/Utils/NumberTest.php +++ b/tests/phpunit/CRM/Utils/NumberTest.php @@ -10,11 +10,11 @@ class CRM_Utils_NumberTest extends CiviUnitTestCase { * @return array */ public function randomDecimalCases() { - $cases = array(); + $cases = []; // array(array $precision, int $expectedMinInclusive, int $expectedMaxExclusive) - $cases[] = array(array(1, 0), 0, 10); - $cases[] = array(array(5, 2), 0, 1000); - $cases[] = array(array(10, 8), 0, 100); + $cases[] = [[1, 0], 0, 10]; + $cases[] = [[5, 2], 0, 1000]; + $cases[] = [[10, 8], 0, 100]; return $cases; } @@ -43,14 +43,14 @@ class CRM_Utils_NumberTest extends CiviUnitTestCase { * @return array */ public function truncDecimalCases() { - $cases = array(); + $cases = []; // array($value, $precision, $expectedValue) - $cases[] = array(523, array(1, 0), 5); - $cases[] = array(523, array(5, 2), 523); - $cases[] = array(523, array(10, 8), 52.3); - $cases[] = array(12345, array(3, 3), 0.123); - $cases[] = array(0.12345, array(10, 0), 12345); - $cases[] = array(-123.45, array(4, 2), -12.34); + $cases[] = [523, [1, 0], 5]; + $cases[] = [523, [5, 2], 523]; + $cases[] = [523, [10, 8], 52.3]; + $cases[] = [12345, [3, 3], 0.123]; + $cases[] = [0.12345, [10, 0], 12345]; + $cases[] = [-123.45, [4, 2], -12.34]; return $cases; }