WordPress.org

Make WordPress Core

Changeset 36788


Ignore:
Timestamp:
02/29/2016 10:37:42 PM (4 years ago)
Author:
boonebgorges
Message:

mbstring.func_overload test should be skipped properly.

This avoids PHPUnit notices related to "risky" tests.

See #36016.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/pomo/mo.php

    r25002 r36788  
    128128
    129129    function test_overloaded_mb_functions() {
    130         // skipIf() method skips the whole test case, not only this method
    131         // that's why we are skipping it the stupid way
    132         if ((ini_get("mbstring.func_overload") & 2) != 0) {
    133             $mo = new MO();
    134             $mo->import_from_file(DIR_TESTDATA . '/pomo/overload.mo');
    135             $this->assertEquals(array('Табло'), $mo->entries['Dashboard']->translations);
     130        if ((ini_get("mbstring.func_overload") & 2) == 0) {
     131            $this->markTestSkipped( __METHOD__ . ' only runs when mbstring.func_overload is enabled.' );
    136132        }
     133
     134        $mo = new MO();
     135        $mo->import_from_file(DIR_TESTDATA . '/pomo/overload.mo');
     136        $this->assertEquals(array('Табло'), $mo->entries['Dashboard']->translations);
    137137    }
    138138
Note: See TracChangeset for help on using the changeset viewer.