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