Changeset 42343 for trunk/tests/phpunit/tests/formatting/RemoveAccents.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/RemoveAccents.php
r38646 r42343 13 13 */ 14 14 public function test_remove_accents_latin1_supplement() { 15 $input = 'ªºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ';15 $input = 'ªºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'; 16 16 $output = 'aoAAAAAAAECEEEEIIIIDNOOOOOOUUUUYTHsaaaaaaaeceeeeiiiidnoooooouuuuythy'; 17 17 … … 20 20 21 21 public function test_remove_accents_latin_extended_a() { 22 $input = 'ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ';22 $input = 'ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ'; 23 23 $output = 'AaAaAaCcCcCcCcDdDdEeEeEeEeEeGgGgGgGgHhHhIiIiIiIiIiIJijJjKkkLlLlLlLlLlNnNnNnnNnOoOoOoOEoeRrRrRrSsSsSsSsTtTtTtUuUuUuUuUuUuWwYyYZzZzZzs'; 24 24 … … 37 37 public function test_remove_accents_iso8859() { 38 38 // 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'; 43 43 44 44 $this->assertEquals( $output, remove_accents( $input ), 'remove_accents from ISO-8859-1 text' ); … … 105 105 public function test_remove_danish_accents() { 106 106 add_filter( 'locale', array( $this, '_set_locale_to_danish' ) ); 107 107 108 108 $this->assertEquals( 'AeOeAaaeoeaa', remove_accents( 'ÆØÅæøå' ) ); 109 109 110 110 remove_filter( 'locale', array( $this, '_set_locale_to_danish' ) ); 111 111 } … … 122 122 123 123 $this->assertEquals( 'allallalla', remove_accents( 'al·lallaŀla' ) ); 124 124 125 125 remove_filter( 'locale', array( $this, '_set_locale_to_catalan' ) ); 126 126 127 127 $this->assertEquals( 'al·lallalla', remove_accents( 'al·lallaŀla' ) ); 128 128 } … … 139 139 140 140 $this->assertEquals( 'DJdj', remove_accents( 'Đđ' ) ); 141 141 142 142 remove_filter( 'locale', array( $this, '_set_locale_to_serbian' ) ); 143 143 144 144 $this->assertEquals( 'Dd', remove_accents( 'Đđ' ) ); 145 145 }
Note: See TracChangeset
for help on using the changeset viewer.