KimaiTest\Ki_Invoice_PrivateFuncTest::testext_invoice_round_value PHP Method

testext_invoice_round_value() public method

    public function testext_invoice_round_value()
    {
        $this->assertSame(17.0, ext_invoice_round_value(17, 0.0));
        $this->assertSame(22.0, ext_invoice_round_value(22, 0));
        $this->assertSame(35.0, ext_invoice_round_value(35.37, 0));
        $this->assertSame(45.5, ext_invoice_round_value(45.37, 0.5));
        $this->assertSame(55.5, ext_invoice_round_value(55.25, 0.5));
        $this->assertSame(65.0, ext_invoice_round_value(65.23999999999999, 0.5));
        $this->assertSame(64.5, ext_invoice_round_value(65.23999999999999, 1.5));
        $this->assertSame(67.2, ext_invoice_round_value(66.40000000000001, 1.6));
    }