mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-03 10:36:49 +09:00
24 lines
642 B
PHP
24 lines
642 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace CurrencyTests;
|
|
|
|
use APIHelper\Request;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
final class GuestTest extends TestCase
|
|
{
|
|
public function testCurrencyDefaults(): void
|
|
{
|
|
$result = Request::makeRequest('guest/currency/get_currency_defaults', ['code' => 'USD']);
|
|
$this->assertTrue($result->wasSuccessful());
|
|
|
|
$defaults = $result->getResult();
|
|
$this->assertEquals($defaults['code'], 'USD');
|
|
$this->assertEquals($defaults['name'], 'US Dollar');
|
|
$this->assertEquals($defaults['symbol'], '$');
|
|
$this->assertEquals($defaults['minorUnits'], 2);
|
|
}
|
|
}
|