Changeset 52010 for trunk/tests/phpunit/tests/formatting/removeAccents.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/removeAccents.php
r51623 r52010 81 81 } 82 82 83 function _remove_accents_germanic_umlauts_cb() {83 public function remove_accents_germanic_umlauts_cb() { 84 84 return 'de_DE'; 85 85 } … … 89 89 */ 90 90 public function test_remove_accents_germanic_umlauts() { 91 add_filter( 'locale', array( $this, ' _remove_accents_germanic_umlauts_cb' ) );91 add_filter( 'locale', array( $this, 'remove_accents_germanic_umlauts_cb' ) ); 92 92 93 93 $this->assertSame( 'AeOeUeaeoeuess', remove_accents( 'ÄÖÜäöüß' ) ); 94 94 95 remove_filter( 'locale', array( $this, ' _remove_accents_germanic_umlauts_cb' ) );95 remove_filter( 'locale', array( $this, 'remove_accents_germanic_umlauts_cb' ) ); 96 96 } 97 97 98 public function _set_locale_to_danish() {98 public function set_locale_to_danish() { 99 99 return 'da_DK'; 100 100 } … … 104 104 */ 105 105 public function test_remove_danish_accents() { 106 add_filter( 'locale', array( $this, ' _set_locale_to_danish' ) );106 add_filter( 'locale', array( $this, 'set_locale_to_danish' ) ); 107 107 108 108 $this->assertSame( 'AeOeAaaeoeaa', remove_accents( 'ÆØÅæøå' ) ); 109 109 110 remove_filter( 'locale', array( $this, ' _set_locale_to_danish' ) );110 remove_filter( 'locale', array( $this, 'set_locale_to_danish' ) ); 111 111 } 112 112 113 public function _set_locale_to_catalan() {113 public function set_locale_to_catalan() { 114 114 return 'ca'; 115 115 } … … 119 119 */ 120 120 public function test_remove_catalan_middot() { 121 add_filter( 'locale', array( $this, ' _set_locale_to_catalan' ) );121 add_filter( 'locale', array( $this, 'set_locale_to_catalan' ) ); 122 122 123 123 $this->assertSame( 'allallalla', remove_accents( 'al·lallaŀla' ) ); 124 124 125 remove_filter( 'locale', array( $this, ' _set_locale_to_catalan' ) );125 remove_filter( 'locale', array( $this, 'set_locale_to_catalan' ) ); 126 126 127 127 $this->assertSame( 'al·lallalla', remove_accents( 'al·lallaŀla' ) ); 128 128 } 129 129 130 public function _set_locale_to_serbian() {130 public function set_locale_to_serbian() { 131 131 return 'sr_RS'; 132 132 } … … 136 136 */ 137 137 public function test_transcribe_serbian_crossed_d() { 138 add_filter( 'locale', array( $this, ' _set_locale_to_serbian' ) );138 add_filter( 'locale', array( $this, 'set_locale_to_serbian' ) ); 139 139 140 140 $this->assertSame( 'DJdj', remove_accents( 'Đđ' ) ); 141 141 142 remove_filter( 'locale', array( $this, ' _set_locale_to_serbian' ) );142 remove_filter( 'locale', array( $this, 'set_locale_to_serbian' ) ); 143 143 144 144 $this->assertSame( 'Dd', remove_accents( 'Đđ' ) );
Note: See TracChangeset
for help on using the changeset viewer.