Make WordPress Core

Changeset 27718


Ignore:
Timestamp:
03/25/2014 05:39:08 PM (10 years ago)
Author:
nacin
Message:

Ensure the $path is trailing-slashed in domain_exists().

Adds tests for [27717].

props ejdanderson, ericmann.
fixes #20589.

File:
1 edited

Legend:

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

    r27706 r27718  
    977977
    978978    function _domain_exists_cb( $exists, $domain, $path, $site_id ) {
    979         if ( 'foo' == $domain && 'bar' == $path )
     979        if ( 'foo' == $domain && 'bar/' == $path )
    980980            return 1234;
    981981        else
     
    998998        $this->assertEquals( null, domain_exists( 'foo', 'baz' ) );
    999999        $this->assertEquals( null, domain_exists( 'bar', 'foo' ) );
     1000
     1001        // Make sure the same result is returned with or without a trailing slash
     1002        $this->assertEquals( domain_exists( 'foo', 'bar' ), domain_exists( 'foo', 'bar/' ) );
    10001003
    10011004        remove_filter( 'domain_exists', array( $this, '_domain_exists_cb' ), 10, 4 );
Note: See TracChangeset for help on using the changeset viewer.