mirror of
https://gh.wpcy.net/https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2026-05-05 09:56:51 +08:00
25 lines
683 B
PHP
25 lines
683 B
PHP
<?php
|
|
declare( strict_types = 1 );
|
|
|
|
namespace WooCommerce\PayPalCommerce\StoreSync\Config;
|
|
|
|
use WooCommerce\PayPalCommerce\TestCase;
|
|
use function Brain\Monkey\Functions\when;
|
|
|
|
/**
|
|
* @covers \WooCommerce\PayPalCommerce\StoreSync\Config\StoreCurrencyValue
|
|
*/
|
|
class StoreCurrencyValueTest extends TestCase {
|
|
/**
|
|
* GIVEN the WooCommerce store is configured with USD as the active currency
|
|
* WHEN value() is called
|
|
* THEN it returns the string 'USD'
|
|
*/
|
|
public function test_value_returns_woocommerce_currency_code(): void {
|
|
when( 'get_woocommerce_currency' )->justReturn( 'USD' );
|
|
|
|
$testee = new StoreCurrencyValue();
|
|
|
|
$this->assertSame( 'USD', $testee->value() );
|
|
}
|
|
}
|