Changeset 39127 for trunk/tests/phpunit/tests/l10n/loadTextdomain.php
- Timestamp:
- 11/03/2016 08:07:08 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/l10n/loadTextdomain.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/l10n/loadTextdomain.php
r39125 r39127 7 7 class Tests_L10n_loadTextdomain extends WP_UnitTestCase { 8 8 protected $locale; 9 protected static $user_id; 10 11 public static function wpSetUpBeforeClass( $factory ) { 12 self::$user_id = $factory->user->create( array( 13 'role' => 'administrator', 14 'locale' => 'de_DE', 15 ) ); 16 } 9 17 10 18 public function setUp() { … … 184 192 } 185 193 194 /** 195 * @ticket 38485 196 */ 197 public function test_load_muplugin_textdomain_user_locale() { 198 set_current_screen( 'dashboard' ); 199 wp_set_current_user( self::$user_id ); 200 201 load_muplugin_textdomain( 'wp-tests-domain' ); 202 203 set_current_screen( 'front' ); 204 205 $this->assertSame( get_user_locale(), $this->locale ); 206 } 207 186 208 public function test_load_plugin_textdomain_site_locale() { 187 209 load_plugin_textdomain( 'wp-tests-domain' ); … … 190 212 } 191 213 214 /** 215 * @ticket 38485 216 */ 217 public function test_load_plugin_textdomain_user_locale() { 218 set_current_screen( 'dashboard' ); 219 wp_set_current_user( self::$user_id ); 220 221 load_plugin_textdomain( 'wp-tests-domain' ); 222 223 set_current_screen( 'front' ); 224 225 $this->assertSame( get_user_locale(), $this->locale ); 226 } 227 192 228 public function test_load_theme_textdomain_site_locale() { 193 229 load_theme_textdomain( 'wp-tests-domain' ); … … 195 231 $this->assertSame( get_locale(), $this->locale ); 196 232 } 233 234 /** 235 * @ticket 38485 236 */ 237 public function test_load_theme_textdomain_user_locale() { 238 set_current_screen( 'dashboard' ); 239 wp_set_current_user( self::$user_id ); 240 241 load_theme_textdomain( 'wp-tests-domain' ); 242 243 set_current_screen( 'front' ); 244 245 $this->assertSame( get_user_locale(), $this->locale ); 246 } 197 247 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)