Index: tests/phpunit/tests/locale.php =================================================================== --- tests/phpunit/tests/locale.php (revision 35637) +++ tests/phpunit/tests/locale.php (working copy) @@ -1,19 +1,37 @@ assertFalse( is_textdomain_loaded( 'wp-tests-domain' ) ); - $this->assertFalse( unload_textdomain( 'wp-tests-domain' ) ); + /** + * Test WP_Locale's normal cases + */ + function test_locale() { + $locale = new WP_Locale(); - $file = DIR_TESTDATA . '/pomo/simple.mo'; - $this->assertTrue( load_textdomain( 'wp-tests-domain', $file ) ); - $this->assertTrue( is_textdomain_loaded( 'wp-tests-domain' ) ); - $this->assertTrue( unload_textdomain( 'wp-tests-domain' ) ); - $this->assertFalse( is_textdomain_loaded( 'wp-tests-domain' ) ); + $this->assertEquals( __( 'January' ), $locale->get_month( 1 ) ); + $this->assertEquals( __( 'February' ), $locale->get_month( '02' ) ); + + $this->assertEquals( __( 'Sunday' ), $locale->get_weekday( 0 ) ); + $this->assertEquals( __( 'S' ), $locale->get_weekday_initial( __( 'Sunday') ) ); + $this->assertEquals( __( 'Sun' ), $locale->get_weekday_abbrev( __( 'Sunday' ) ) ); + + $this->assertEquals( __( 'January' ), $locale->get_month( 1 ) ); + $this->assertEquals( __( 'Jan' ), $locale->get_month_abbrev( __( 'January' ) ) ); + + $this->assertEquals( __( 'am' ), $locale->get_meridiem( _('am') ) ); + + return $locale; } + + /** + * @param WP_Locale $locale + * @depends test_locale + */ + function test_rtl_src_admin_notice( $locale ) { + $this->expectOutputRegex( '#
.*