Make WordPress Core

Changeset 1321 in tests


Ignore:
Timestamp:
07/28/2013 09:01:11 PM (11 years ago)
Author:
mdawaffe
Message:

Fix encoding of whitespace characters in shortcode tests for #6562.

Fixes #6562.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/shortcode.php

    r1239 r1321  
    279279    }
    280280
    281     /**
    282      * @ticket 6562
    283      *
    284      * @TODO Review this test as it may be incorrect
    285      */
    286281    function test_utf8_whitespace_1() {
    287         do_shortcode("[test-shortcode-tag foo=\"bar\" \x00\xA0baz=\"123\"]");
     282        // NO-BREAK SPACE: U+00A0
     283        do_shortcode("[test-shortcode-tag foo=\"bar\" \xC2\xA0baz=\"123\"]");
    288284        $this->assertEquals( array('foo' => 'bar', 'baz' => '123'), $this->atts );
    289285        $this->assertEquals( '', $this->content );
    290286    }
    291287
    292     /**
    293      * @ticket 6562
    294      *
    295      * @TODO Review this test as it may be incorrect
    296      */
    297288    function test_utf8_whitespace_2() {
    298         do_shortcode("[test-shortcode-tag foo=\"bar\" \x20\x0babc=\"def\"]");
     289        // ZERO WIDTH SPACE: U+200B
     290        do_shortcode("[test-shortcode-tag foo=\"bar\" \xE2\x80\x8Babc=\"def\"]");
    299291        $this->assertEquals( array('foo' => 'bar', 'abc' => 'def'), $this->atts );
    300292        $this->assertEquals( '', $this->content );
Note: See TracChangeset for help on using the changeset viewer.