woocommerce-paypal-payments/modules.local/ppcp-api-client/tests/PHPUnit/Entity/MoneyTest.php
2020-04-13 13:52:43 +03:00

24 lines
No EOL
535 B
PHP

<?php
declare(strict_types=1);
namespace Inpsyde\PayPalCommerce\ApiClient\Entity;
use PHPUnit\Framework\TestCase;
class MoneyTest extends TestCase
{
public function test() {
$testee = new Money(1.10, 'currencyCode');
$this->assertEquals(1.10, $testee->value());
$this->assertEquals('currencyCode', $testee->currencyCode());
$expected = [
'currency_code' => 'currencyCode',
'value' => 1.10,
];
$this->assertEquals($expected, $testee->toArray());
}
}