| 97 | |
| 98 | public function _set_locale_to_danish() { |
| 99 | return 'da_DK'; |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * @ticket 23907 |
| 104 | */ |
| 105 | public function test_remove_danish_accents() { |
| 106 | add_filter( 'locale', array( $this, '_set_locale_to_danish' ) ); |
| 107 | |
| 108 | $this->assertEquals( 'AeOeAaoeaa', remove_accents( 'ÆØÅøå' ) ); |
| 109 | |
| 110 | remove_filter( 'locale', array( $this, '_set_locale_to_danish' ) ); |
| 111 | } |
| 112 | |
| 113 | public function _set_locale_to_swedish() { |
| 114 | return 'sv_SE'; |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * @ticket 23907 |
| 119 | */ |
| 120 | public function test_remove_swedish_accents() { |
| 121 | add_filter( 'locale', array( $this, '_set_locale_to_swedish' ) ); |
| 122 | |
| 123 | $this->assertEquals( 'AeOeAaoeaa', remove_accents( 'ÆØÅøå' ) ); |
| 124 | |
| 125 | remove_filter( 'locale', array( $this, '_set_locale_to_swedish' ) ); |
| 126 | } |
| 127 | |
| 128 | public function _set_locale_to_norse() { |
| 129 | return 'no_NO'; |
| 130 | } |
| 131 | |
| 132 | /** |
| 133 | * @ticket 23907 |
| 134 | */ |
| 135 | public function test_remove_norse_accents() { |
| 136 | add_filter( 'locale', array( $this, '_set_locale_to_norse' ) ); |
| 137 | |
| 138 | $this->assertEquals( 'AeOeAaoeaa', remove_accents( 'ÆØÅøå' ) ); |
| 139 | |
| 140 | remove_filter( 'locale', array( $this, '_set_locale_to_norse' ) ); |
| 141 | } |