Add tests for `wc_site_is_https`

This commit is contained in:
Fredrik Forsmo 2016-08-01 13:21:55 +02:00
parent 582133cb43
commit 1497075b9e
1 changed files with 13 additions and 0 deletions

View File

@ -97,6 +97,19 @@ class WC_Tests_Conditional_Functions extends WC_Unit_Test_Case {
);
}
/**
* Test wc_site_is_https().
*/
public function test_wc_site_is_https() {
$this->assertFalse( wc_site_is_https() );
add_filter( 'pre_option_home', function () {
return 'https://example.org';
} );
$this->assertTrue( wc_site_is_https() );
}
/**
* Test wc_is_valid_url().
*