Make WordPress Core


Ignore:
Timestamp:
06/16/2014 03:07:37 PM (10 years ago)
Author:
ocean90
Message:

Use the value of WP_TESTS_DOMAIN in some unit tests.

props danielhuesken.
fixes #28552.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/functions/getArchives.php

    r28379 r28757  
    3434
    3535        $expected['limit'] = <<<EOF
    36 <li><a href='http://example.org/?p={$ids[0]}'>Post title 8</a></li>
    37     <li><a href='http://example.org/?p={$ids[1]}'>Post title 7</a></li>
    38     <li><a href='http://example.org/?p={$ids[2]}'>Post title 6</a></li>
    39     <li><a href='http://example.org/?p={$ids[3]}'>Post title 5</a></li>
    40     <li><a href='http://example.org/?p={$ids[4]}'>Post title 4</a></li>
     36<li><a href='http://{WP_TESTS_DOMAIN}/?p={$ids[0]}'>Post title 8</a></li>
     37    <li><a href='http://{WP_TESTS_DOMAIN}/?p={$ids[1]}'>Post title 7</a></li>
     38    <li><a href='http://{WP_TESTS_DOMAIN}/?p={$ids[2]}'>Post title 6</a></li>
     39    <li><a href='http://{WP_TESTS_DOMAIN}/?p={$ids[3]}'>Post title 5</a></li>
     40    <li><a href='http://{WP_TESTS_DOMAIN}/?p={$ids[4]}'>Post title 4</a></li>
    4141EOF;
     42        $expected['limit'] = str_replace( '{WP_TESTS_DOMAIN}', WP_TESTS_DOMAIN, $expected['limit'] );
     43
    4244        $this->assertEquals( $expected['limit'], trim( wp_get_archives( array( 'echo' => false, 'type' => 'postbypost', 'limit' => 5 ) ) ) );
    4345    }
Note: See TracChangeset for help on using the changeset viewer.