Update test_get_woocommerce_currencies to test for both cached and uncached currencies, gives us more code coverage
This commit is contained in:
parent
7fa802071e
commit
eb533d0263
|
@ -27,6 +27,7 @@ class WC_Tests_Core_Functions extends WC_Unit_Test_Case {
|
|||
* @since 2.2
|
||||
*/
|
||||
public function test_get_woocommerce_currencies() {
|
||||
static $currencies;
|
||||
|
||||
$expected_currencies = array(
|
||||
'AED' => 'United Arab Emirates dirham',
|
||||
|
@ -194,6 +195,10 @@ class WC_Tests_Core_Functions extends WC_Unit_Test_Case {
|
|||
);
|
||||
|
||||
$this->assertEquals( $expected_currencies, get_woocommerce_currencies() );
|
||||
|
||||
// Unset cached currencies and test again.
|
||||
unset( $currencies );
|
||||
$this->assertEquals( $expected_currencies, get_woocommerce_currencies() );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue