WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/16/2014 10:34:18 PM (7 years ago)
Author:
wonderboymusic
Message:

Properly set $subdomain_error to false when applicable in ms_subdomain_constants(). This was previously untestable because it used static vars: use globals instead.

Adds unit test.
Fixes #28697.

File:
1 edited

Legend:

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

    r28943 r29200  
    2424        parent::tearDown();
    2525        $wpdb->suppress_errors( $this->suppress );
     26    }
     27
     28    /**
     29     * @ticket 28697
     30     */
     31    function test_ms_subdomain_constants() {
     32        global $subdomain_error;
     33
     34        $this->assertFalse( $subdomain_error );
     35        ms_subdomain_constants();
     36        $this->assertFalse( $subdomain_error );
    2637    }
    2738
Note: See TracChangeset for help on using the changeset viewer.