Changeset 36766 for trunk/tests/phpunit/tests/l10n.php
- Timestamp:
- 02/28/2016 08:48:58 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/l10n.php
r36718 r36766 6 6 */ 7 7 class Tests_L10n extends WP_UnitTestCase { 8 9 /** 10 * @ticket 35961 11 */ 12 function test_n_noop() { 13 $text_domain = 'text-domain'; 14 $nooped_plural = _n_noop( '%s post', '%s posts', $text_domain ); 15 16 $this->assertNotEmpty( $nooped_plural['domain'] ); 17 $this->assertEquals( '%s posts', translate_nooped_plural( $nooped_plural, 0, $text_domain ) ); 18 $this->assertEquals( '%s post', translate_nooped_plural( $nooped_plural, 1, $text_domain ) ); 19 $this->assertEquals( '%s posts', translate_nooped_plural( $nooped_plural, 2, $text_domain ) ); 20 } 21 22 /** 23 * @ticket 35961 24 */ 25 function test_nx_noop() { 26 $text_domain = 'text-domain'; 27 $nooped_plural = _nx_noop( '%s post', '%s posts', 'my-context', $text_domain ); 28 29 $this->assertNotEmpty( $nooped_plural['domain'] ); 30 $this->assertNotEmpty( $nooped_plural['context'] ); 31 $this->assertEquals( '%s posts', translate_nooped_plural( $nooped_plural, 0, $text_domain ) ); 32 $this->assertEquals( '%s post', translate_nooped_plural( $nooped_plural, 1, $text_domain ) ); 33 $this->assertEquals( '%s posts', translate_nooped_plural( $nooped_plural, 2, $text_domain ) ); 34 } 8 35 9 36 function test_load_unload_textdomain() {
Note: See TracChangeset
for help on using the changeset viewer.