Changeset 43359
- Timestamp:
- 06/16/2018 12:44:46 PM (6 years ago)
- Location:
- trunk/tests
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/db.php
r42343 r43359 91 91 92 92 // Switch to Russian 93 $flag = setlocale( LC_ALL, 'ru_RU.utf8', 'rus', 'fr_FR.utf8', 'fr_FR', 'de_DE.utf8', 'de_DE', 'es_ES.utf8', 'es_ES' );93 $flag = setlocale( LC_ALL, 'ru_RU.utf8', 'rus', 'fr_FR.utf8', 'fr_FR', 'de_DE.utf8', 'de_DE', 'es_ES.utf8', 'es_ES', 'ja_JP.utf8', 'ja_JP' ); 94 94 if ( false === $flag ) { 95 95 $this->markTestSkipped( 'No European languages available for testing' ); -
trunk/tests/phpunit/tests/formatting/BlogInfo.php
r42343 r43359 30 30 array( 'oci', 'oci' ), 31 31 array( 'pt_PT_ao1990', 'pt-PT-ao1990' ), 32 array( 'ja_JP', 'ja-JP' ), 32 33 ); 33 34 } -
trunk/tests/phpunit/tests/l10n.php
r42343 r43359 54 54 55 55 $array = get_available_languages( DIR_TESTDATA . '/languages/' ); 56 $this->assertEquals( array( 'de_DE', 'en_GB', 'es_ES' ), $array );56 $this->assertEquals( array( 'de_DE', 'en_GB', 'es_ES', 'ja_JP' ), $array ); 57 57 } 58 58 … … 98 98 $this->assertContains( '<option value="de_DE" lang="de" selected=\'selected\' data-installed="1">Deutsch</option>', $actual ); 99 99 $this->assertContains( '<option value="it_IT" lang="it">Italiano</option>', $actual ); 100 $this->assertContains( '<option value="ja_JP" lang="ja">日本語</option>', $actual ); 100 101 } 101 102 … … 121 122 $this->assertContains( '<option value="de_DE" lang="de" selected=\'selected\' data-installed="1">Deutsch</option>', $actual ); 122 123 $this->assertContains( '<option value="it_IT" lang="it">Italiano</option>', $actual ); 124 $this->assertContains( '<option value="ja_JP" lang="ja">日本語</option>', $actual ); 123 125 } 124 126 … … 142 144 $this->assertContains( '<option value="de_DE" lang="de" data-installed="1">Deutsch</option>', $actual ); 143 145 $this->assertContains( '<option value="it_IT" lang="it">Italiano</option>', $actual ); 146 $this->assertContains( '<option value="ja_JP" lang="ja">日本語</option>', $actual ); 147 } 148 149 /** 150 * Add site default language to ja_JP in dropdown 151 */ 152 function test_wp_dropdown_languages_site_default_ja_JP() { 153 $args = array( 154 'id' => 'foo', 155 'name' => 'bar', 156 'languages' => array( 'ja_JP' ), 157 'translations' => $this->wp_dropdown_languages_filter(), 158 'selected' => 'ja_JP', 159 'echo' => false, 160 'show_option_site_default' => true, 161 ); 162 $actual = wp_dropdown_languages( $args ); 163 164 $this->assertContains( 'id="foo"', $actual ); 165 $this->assertContains( 'name="bar"', $actual ); 166 $this->assertContains( '<option value="site-default" data-installed="1">Site Default</option>', $actual ); 167 $this->assertContains( '<option value="" lang="en" data-installed="1">English (United States)</option>', $actual ); 168 $this->assertContains( '<option value="de_DE" lang="de">Deutsch</option>', $actual ); 169 $this->assertContains( '<option value="it_IT" lang="it">Italiano</option>', $actual ); 170 $this->assertContains( '<option value="ja_JP" lang="ja" selected=\'selected\' data-installed="1">日本語</option>', $actual ); 171 } 172 173 /** 174 * Select dropdown language from de_DE to ja_JP 175 */ 176 function test_wp_dropdown_languages_ja_JP_selected() { 177 $args = array( 178 'id' => 'foo', 179 'name' => 'bar', 180 'languages' => array( 'de_DE' ), 181 'translations' => $this->wp_dropdown_languages_filter(), 182 'selected' => 'ja_JP', 183 'echo' => false, 184 ); 185 $actual = wp_dropdown_languages( $args ); 186 187 $this->assertContains( 'id="foo"', $actual ); 188 $this->assertContains( 'name="bar"', $actual ); 189 $this->assertContains( '<option value="" lang="en" data-installed="1">English (United States)</option>', $actual ); 190 $this->assertContains( '<option value="de_DE" lang="de" data-installed="1">Deutsch</option>', $actual ); 191 $this->assertContains( '<option value="it_IT" lang="it">Italiano</option>', $actual ); 192 $this->assertContains( '<option value="ja_JP" lang="ja" selected=\'selected\'>日本語</option>', $actual ); 144 193 } 145 194 … … 161 210 'iso' => array( 'it', 'ita' ), 162 211 ), 212 'ja_JP' => array( 213 'language' => 'ja_JP', 214 'native_name' => '日本語', 215 'iso' => array( 'ja' ), 216 ), 163 217 ); 164 218 } -
trunk/tests/qunit/fixtures/wp-api-generated.js
r43001 r43359 2571 2571 "de_DE", 2572 2572 "en_GB", 2573 "es_ES" 2573 "es_ES", 2574 "ja_JP" 2574 2575 ], 2575 2576 "description": "Locale for the user.", … … 2698 2699 "de_DE", 2699 2700 "en_GB", 2700 "es_ES" 2701 "es_ES", 2702 "ja_JP" 2701 2703 ], 2702 2704 "description": "Locale for the user.", … … 2835 2837 "de_DE", 2836 2838 "en_GB", 2837 "es_ES" 2839 "es_ES", 2840 "ja_JP" 2838 2841 ], 2839 2842 "description": "Locale for the user.",
Note: See TracChangeset
for help on using the changeset viewer.