1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Tests for number_format used in Mollie

This commit is contained in:
Benjamin Beganović 2021-08-03 14:36:18 +02:00
parent 373f169b39
commit 8c8be024a3

View File

@ -0,0 +1,32 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace Tests\Unit;
use PHPUnit\Framework\TestCase;
class MollieAmountFormatTest extends TestCase
{
/**
* @covers \App\PaymentDrivers\MolliePaymentDriver::convertToMollieAmount()
*/
public function testFormatterIsWorkingCorrectly()
{
$this->assertEquals('1000.00', \number_format((float) 1000, 2, '.', ''));
$this->assertEquals('1000.00', \number_format((float) "1000", 2, '.', ''));
$this->assertEquals('1000.00', \number_format((float) "1000.00", 2, '.', ''));
$this->assertEquals('1000.00', \number_format((float) "1000.00000", 2, '.', ''));
}
}