initial commit
This commit is contained in:
commit
5ebc506921
975 changed files with 154341 additions and 0 deletions
18
tests/unit_tests/02_accounting/money.php
Normal file
18
tests/unit_tests/02_accounting/money.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Garradin;
|
||||
use KD2\Test;
|
||||
|
||||
require_once INIT;
|
||||
|
||||
Test::strictlyEquals(500, Utils::moneyToInteger('5'));
|
||||
Test::strictlyEquals(442, Utils::moneyToInteger('4,42'));
|
||||
Test::strictlyEquals(442, Utils::moneyToInteger('4.42'));
|
||||
Test::strictlyEquals(4, Utils::moneyToInteger('0,04'));
|
||||
Test::strictlyEquals(30, Utils::moneyToInteger('0,3'));
|
||||
Test::strictlyEquals(202034, Utils::moneyToInteger('2020,34'));
|
||||
|
||||
Test::strictlyEquals('5,50', Utils::money_format(550));
|
||||
Test::strictlyEquals('0,05', Utils::money_format(5));
|
||||
Test::strictlyEquals('0,50', Utils::money_format(50));
|
||||
Test::strictlyEquals('1 000,50', Utils::money_format(100050));
|
||||
Loading…
Add table
Add a link
Reference in a new issue