mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertSame( 0, strpos( ... ) )` with `assertStringStartsWith()` to use native PHPUnit functionality. Follow-up to [51335], [51337], [51367], [51397], [51403], [51404], [51436], [51438], [51448]. See #53363. git-svn-id: https://develop.svn.wordpress.org/trunk@51449 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bec8574024
commit
bf3d6dd642
@ -40,7 +40,7 @@ class Tests_Post_Nav_Menu extends WP_UnitTestCase {
|
||||
)
|
||||
);
|
||||
|
||||
$this->assertSame( 0, strpos( $menu, '<ul' ) );
|
||||
$this->assertStringStartsWith( '<ul', $menu );
|
||||
}
|
||||
|
||||
function test_wp_get_associated_nav_menu_items() {
|
||||
|
||||
@ -250,7 +250,7 @@ class Tests_URL extends WP_UnitTestCase {
|
||||
$home_https = str_replace( 'http://', 'https://', $home );
|
||||
|
||||
// is_ssl() should determine the scheme in the admin.
|
||||
$this->assertSame( 0, strpos( $home, 'http://' ) );
|
||||
$this->assertStringStartsWith( 'http://', $home );
|
||||
$_SERVER['HTTPS'] = 'on';
|
||||
$this->assertSame( $home_https, network_home_url() );
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user