Make WordPress Core


Ignore:
Timestamp:
05/04/2024 07:23:31 PM (7 months ago)
Author:
johnbillion
Message:

Bootstrap/Load: Add support for custom ports in multisite site addresses.

This allows a Multisite network to use an address that includes a port name, such as example.com:1234, and adds support for this to the local development environment too. You can now run a Multisite installation on the local development environment, for example at localhost:8889.

This also fixes some bugs with running a single site installation on a port, and updates the testing infrastructure so that the whole test suite runs both with and without a port number.

Props djzone, scribu, nacin, ipstenu, F J Kaiser, jeremyfelt, johnjamesjacoby, spacedmonkey, PerS, Clorith, Blackbam, enrico.sorcinelli, Jules Colle, obliviousharmony, desrosj, johnbillion

Fixes #21077, #52088

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/wpListUsers.php

    r53489 r58097  
    120120                    'feed' => 'User feed',
    121121                ),
    122                 'expected' => '<li>jane (<a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_jane">User feed</a>)</li>' .
    123                         '<li>michelle (<a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_michelle">User feed</a>)</li>' .
    124                         '<li>paul (<a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_paul">User feed</a>)</li>' .
    125                         '<li>zack (<a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_zack">User feed</a>)</li>',
     122                'expected' => '<li>jane (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_jane">User feed</a>)</li>' .
     123                        '<li>michelle (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_michelle">User feed</a>)</li>' .
     124                        '<li>paul (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_paul">User feed</a>)</li>' .
     125                        '<li>zack (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_zack">User feed</a>)</li>',
    126126            ),
    127127            'the feed of each user and an image' => array(
     
    130130                    'feed_image' => 'http://example.org/image.jpg',
    131131                ),
    132                 'expected' => '<li>jane <a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_jane"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>' .
    133                         '<li>michelle <a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_michelle"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>' .
    134                         '<li>paul <a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_paul"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>' .
    135                         '<li>zack <a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_zack"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>',
     132                'expected' => '<li>jane <a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_jane"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>' .
     133                        '<li>michelle <a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_michelle"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>' .
     134                        '<li>paul <a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_paul"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>' .
     135                        '<li>zack <a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_zack"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>',
    136136            ),
    137137            'a feed of the specified type'       => array(
     
    140140                    'feed_type' => 'atom',
    141141                ),
    142                 'expected' => '<li>jane (<a href="http://example.org/?feed=atom&amp;author=AUTHOR_ID_jane">User feed as atom</a>)</li>' .
    143                         '<li>michelle (<a href="http://example.org/?feed=atom&amp;author=AUTHOR_ID_michelle">User feed as atom</a>)</li>' .
    144                         '<li>paul (<a href="http://example.org/?feed=atom&amp;author=AUTHOR_ID_paul">User feed as atom</a>)</li>' .
    145                         '<li>zack (<a href="http://example.org/?feed=atom&amp;author=AUTHOR_ID_zack">User feed as atom</a>)</li>',
     142                'expected' => '<li>jane (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=atom&amp;author=AUTHOR_ID_jane">User feed as atom</a>)</li>' .
     143                        '<li>michelle (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=atom&amp;author=AUTHOR_ID_michelle">User feed as atom</a>)</li>' .
     144                        '<li>paul (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=atom&amp;author=AUTHOR_ID_paul">User feed as atom</a>)</li>' .
     145                        '<li>zack (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=atom&amp;author=AUTHOR_ID_zack">User feed as atom</a>)</li>',
    146146            ),
    147147            'no output via echo'                 => array(
Note: See TracChangeset for help on using the changeset viewer.