mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
24 lines
No EOL
535 B
PHP
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());
|
|
}
|
|
} |