diff --git a/tests/phpunit/tests/ms.php b/tests/phpunit/tests/ms.php index 7687e1e52f..ed5d90ff15 100644 --- a/tests/phpunit/tests/ms.php +++ b/tests/phpunit/tests/ms.php @@ -976,7 +976,7 @@ class Tests_MS extends WP_UnitTestCase { } function _domain_exists_cb( $exists, $domain, $path, $site_id ) { - if ( 'foo' == $domain && 'bar' == $path ) + if ( 'foo' == $domain && 'bar/' == $path ) return 1234; else return null; @@ -998,6 +998,9 @@ class Tests_MS extends WP_UnitTestCase { $this->assertEquals( null, domain_exists( 'foo', 'baz' ) ); $this->assertEquals( null, domain_exists( 'bar', 'foo' ) ); + // Make sure the same result is returned with or without a trailing slash + $this->assertEquals( domain_exists( 'foo', 'bar' ), domain_exists( 'foo', 'bar/' ) ); + remove_filter( 'domain_exists', array( $this, '_domain_exists_cb' ), 10, 4 ); $this->assertEquals( null, domain_exists( 'foo', 'bar' ) );