Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (7 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

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

    r38646 r42343  
    1313     */
    1414    public function test_remove_accents_latin1_supplement() {
    15         $input = 'ªºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ';
     15        $input  = 'ªºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ';
    1616        $output = 'aoAAAAAAAECEEEEIIIIDNOOOOOOUUUUYTHsaaaaaaaeceeeeiiiidnoooooouuuuythy';
    1717
     
    2020
    2121    public function test_remove_accents_latin_extended_a() {
    22         $input = 'ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ';
     22        $input  = 'ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ';
    2323        $output = 'AaAaAaCcCcCcCcDdDdEeEeEeEeEeGgGgGgGgHhHhIiIiIiIiIiIJijJjKkkLlLlLlLlLlNnNnNnnNnOoOoOoOEoeRrRrRrSsSsSsSsTtTtTtUuUuUuUuUuUuWwYyYZzZzZzs';
    2424
     
    3737    public function test_remove_accents_iso8859() {
    3838        // File is Latin1 encoded
    39         $file = DIR_TESTDATA . '/formatting/remove_accents.01.input.txt';
    40         $input = file_get_contents( $file );
    41         $input = trim( $input );
    42         $output = "EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyyOEoeAEDHTHssaedhth";
     39        $file   = DIR_TESTDATA . '/formatting/remove_accents.01.input.txt';
     40        $input  = file_get_contents( $file );
     41        $input  = trim( $input );
     42        $output = 'EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyyOEoeAEDHTHssaedhth';
    4343
    4444        $this->assertEquals( $output, remove_accents( $input ), 'remove_accents from ISO-8859-1 text' );
     
    105105    public function test_remove_danish_accents() {
    106106        add_filter( 'locale', array( $this, '_set_locale_to_danish' ) );
    107        
     107
    108108        $this->assertEquals( 'AeOeAaaeoeaa', remove_accents( 'ÆØÅæøå' ) );
    109        
     109
    110110        remove_filter( 'locale', array( $this, '_set_locale_to_danish' ) );
    111111    }
     
    122122
    123123        $this->assertEquals( 'allallalla', remove_accents( 'al·lallaŀla' ) );
    124        
     124
    125125        remove_filter( 'locale', array( $this, '_set_locale_to_catalan' ) );
    126        
     126
    127127        $this->assertEquals( 'al·lallalla', remove_accents( 'al·lallaŀla' ) );
    128128    }
     
    139139
    140140        $this->assertEquals( 'DJdj', remove_accents( 'Đđ' ) );
    141        
     141
    142142        remove_filter( 'locale', array( $this, '_set_locale_to_serbian' ) );
    143        
     143
    144144        $this->assertEquals( 'Dd', remove_accents( 'Đđ' ) );
    145145    }
Note: See TracChangeset for help on using the changeset viewer.