Make WordPress Core

Ticket #30455: 0003-Actually-perform-a-test-against-the-string.patch

File 0003-Actually-perform-a-test-against-the-string.patch, 1000 bytes (added by akumria, 11 years ago)

Test Big5 strings

  • tests/phpunit/tests/formatting/SeemsUtf8.php

    From 221b1108d6accc5a82d8f204b0a33453f0550ade Mon Sep 17 00:00:00 2001
    From: Anand Kumria <akumria@acm.org>
    Date: Sat, 22 Nov 2014 16:54:27 +0000
    Subject: [PATCH 3/3] Actually perform a test against the string
    
    ---
     tests/phpunit/tests/formatting/SeemsUtf8.php | 8 +-------
     1 file changed, 1 insertion(+), 7 deletions(-)
    
    diff --git a/tests/phpunit/tests/formatting/SeemsUtf8.php b/tests/phpunit/tests/formatting/SeemsUtf8.php
    index 6727f2c..2858b20 100644
    a b class Tests_Formatting_SeemsUtf8 extends WP_UnitTestCase { 
    2828         * @dataProvider big5_strings
    2929         */
    3030        function test_returns_false_for_non_utf8_strings( $big5_string ) {
    31                 $this->markTestIncomplete( 'This test does not have any assertions.' );
    3231
    33                 $big5 = $big5[0];
    34                 $strings = array(
    35                         "abc",
    36                         "123",
    37                         $big5
    38                 );
     32                $this->assertFalse( seems_utf8( $big5_string ) );
    3933        }
    4034
    4135        function big5_strings() {