1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-06 03:02:34 +01:00
invoiceninja/tests/Unit/NumberTest.php
David Bomba 43e57d0117
Fixes for self-update (#3514)
* minor fix for payment notifications

* styleci

* Limit Self updating to self hosters only
:

* Fixes for designs

* Minor fixes for self-update
2020-03-21 16:37:30 +11:00

35 lines
625 B
PHP

<?php
namespace Tests\Unit;
use App\Utils\Number;
use Tests\TestCase;
/**
* @test
* @covers App\Utils\Number
*/
class NumberTest extends TestCase
{
public function testRoundingThreeLow()
{
$rounded = Number::roundValue(3.144444444444, 3);
$this->assertEquals(3.144, $rounded);
}
public function testRoundingThreeHigh()
{
$rounded = Number::roundValue(3.144944444444, 3);
$this->assertEquals(3.145, $rounded);
}
public function testRoundingTwoLow()
{
$rounded = Number::roundValue(2.145);
$this->assertEquals(2.15, $rounded);
}
}