mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
force_ssl_login() has been functionally identical to force_ssl_admin() since 4.0 (#10267), so its test assertions can be removed as the function has been deprecated in [34700]. The remaining assertions suitably cover force_ssl_admin().
See #34011 git-svn-id: https://develop.svn.wordpress.org/trunk@34703 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -240,7 +240,6 @@ class Tests_URL extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
$forced_admin = force_ssl_admin();
|
||||
$forced_login = force_ssl_login();
|
||||
$i = 0;
|
||||
foreach ( $links as $link ) {
|
||||
$this->assertEquals( $https_links[ $i ], set_url_scheme( $link, 'https' ) );
|
||||
@@ -253,7 +252,6 @@ class Tests_URL extends WP_UnitTestCase {
|
||||
$_SERVER['HTTPS'] = 'off';
|
||||
$this->assertEquals( $http_links[ $i ], set_url_scheme( $link ) );
|
||||
|
||||
force_ssl_login( false );
|
||||
force_ssl_admin( true );
|
||||
$this->assertEquals( $https_links[ $i ], set_url_scheme( $link, 'admin' ) );
|
||||
$this->assertEquals( $https_links[ $i ], set_url_scheme( $link, 'login_post' ) );
|
||||
@@ -266,17 +264,10 @@ class Tests_URL extends WP_UnitTestCase {
|
||||
$this->assertEquals( $http_links[ $i ], set_url_scheme( $link, 'login' ) );
|
||||
$this->assertEquals( $http_links[ $i ], set_url_scheme( $link, 'rpc' ) );
|
||||
|
||||
force_ssl_login( true );
|
||||
$this->assertEquals( $https_links[ $i ], set_url_scheme( $link, 'admin' ) );
|
||||
$this->assertEquals( $https_links[ $i ], set_url_scheme( $link, 'login_post' ) );
|
||||
$this->assertEquals( $https_links[ $i ], set_url_scheme( $link, 'login' ) );
|
||||
$this->assertEquals( $https_links[ $i ], set_url_scheme( $link, 'rpc' ) );
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
force_ssl_admin( $forced_admin );
|
||||
force_ssl_login( $forced_login );
|
||||
}
|
||||
|
||||
public function test_get_adjacent_post() {
|
||||
|
||||
Reference in New Issue
Block a user