Make WordPress Core


Ignore:
Timestamp:
11/22/2014 07:53:37 PM (10 years ago)
Author:
boonebgorges
Message:

Improvements to encoded character formatting tests.

In sanitize_title_with_dashes() and sanitize_user() tests, we break large
test methods into smaller ones in order to isolate those that actually describe
the bug being reported in ticket #10823. The unit tests that are continuing to
fail have been attached as a patch to that ticket.

See #30284.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/SanitizeUser.php

    r25002 r30515  
    1010        $this->assertEquals($expected, sanitize_user($input));
    1111    }
    12     /**
    13      * @ticket 10823
    14      */
    15     function test_strips_entities() {
     12
     13    public function test_strips_encoded_ampersand() {
    1614        $this->assertEquals("ATT", sanitize_user("AT&T"));
     15    }
     16
     17    public function test_strips_encoded_ampersand_when_followed_by_semicolon() {
    1718        $this->assertEquals("ATT Test;", sanitize_user("AT&T Test;"));
    18         $this->assertEquals("AT&T Test;", sanitize_user("AT&T Test;"));
    1919    }
     20
    2021    function test_strips_percent_encoded_octets() {
    2122        $expected = is_multisite() ? 'franois' : 'Franois';
Note: See TracChangeset for help on using the changeset viewer.