Make WordPress Core


Ignore:
Timestamp:
07/16/2021 07:13:11 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/url.php

    r51419 r51449  
    251251
    252252        // is_ssl() should determine the scheme in the admin.
    253         $this->assertSame( 0, strpos( $home, 'http://' ) );
     253        $this->assertStringStartsWith( 'http://', $home );
    254254        $_SERVER['HTTPS'] = 'on';
    255255        $this->assertSame( $home_https, network_home_url() );
Note: See TracChangeset for help on using the changeset viewer.