Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117885026
WalletTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
830 B
Referenced Files
None
Subscribers
None
WalletTest.php
View Options
<?php
namespace
Tests\Unit
;
use
App\Wallet
;
use
Tests\TestCase
;
class
WalletTest
extends
TestCase
{
/**
* Test Wallet::money()
*
* @return void
*/
public
function
testMoney
()
{
$wallet
=
new
Wallet
([
'currency'
=>
'CHF'
,
]);
$money
=
$wallet
->
money
(-
123
);
$this
->
assertSame
(
'-1,23 CHF'
,
$money
);
// This test is here to remind us that the method will give
// different results for different locales, but also depending
// if NumberFormatter (intl extension) is installed or not.
// NumberFormatter also returns some surprising output for
// some locales and e.g. negative numbers.
// We'd have to improve on that as soon as we'd want to use
// other locale than the default de_DE.
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Apr 6, 1:48 AM (6 d, 9 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
1e/c1/8901a6d7a6a90c91286dc3f96052
Default Alt Text
WalletTest.php (830 B)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline