Unit tests for wc_is_active_theme

This commit is contained in:
Gerhard Potgieter 2017-12-15 14:43:56 +02:00
parent 4ba9af1c2f
commit 58457dab3a
1 changed files with 11 additions and 0 deletions

View File

@ -52,4 +52,15 @@ class WC_Tests_WooCommerce_Functions extends WC_Unit_Test_Case {
) );
$this->assertEquals( $new_currency, $order->get_currency() );
}
/**
* Test the wc_is_active_theme function.
*
* @return void
*/
public function test_wc_is_active_theme() {
$this->assertTrue( wc_is_active_theme( 'default' ) );
$this->assertFalse( wc_is_active_theme( 'twentyfifteen' ) );
$this->assertTrue( wc_is_active_theme( array( 'default', 'twentyseventeen' ) ) );
}
}