Changeset 47122 for trunk/tests/phpunit/tests/pomo/translations.php
- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/pomo/translations.php
r46586 r47122 13 13 $po->add_entry( $entry ); 14 14 $this->assertEquals( array( $entry->key() => $entry ), $po->entries ); 15 // add the same entry more than once16 // we do not need to test proper key generation here, see test_key()15 // Add the same entry more than once. 16 // We do not need to test proper key generation here, see test_key(). 17 17 $po->add_entry( $entry ); 18 18 $po->add_entry( $entry ); … … 26 26 $po->entries 27 27 ); 28 // add empty entry28 // Add empty entry. 29 29 $this->assertEquals( false, $po->add_entry( $empty ) ); 30 30 $this->assertEquals( … … 36 36 ); 37 37 38 // give add_entry() the arguments and let it create the entry itself38 // Give add_entry() the arguments and let it create the entry itself. 39 39 $po = new Translations(); 40 40 $po->add_entry( array( 'singular' => 'baba' ) ); … … 94 94 $this->assertEquals( 'other', $domain->translate_plural( 'other', 'others', 1 ) ); 95 95 $this->assertEquals( 'others', $domain->translate_plural( 'other', 'others', 111 ) ); 96 // too few translations + cont logic96 // Too few translations + cont logic. 97 97 $this->assertEquals( 'babas', $domain->translate_plural( 'baba', 'babas', 2 ) ); 98 98 $this->assertEquals( 'babas', $domain->translate_plural( 'baba', 'babas', 0 ) ); 99 99 $this->assertEquals( 'babas', $domain->translate_plural( 'baba', 'babas', -1 ) ); 100 100 $this->assertEquals( 'babas', $domain->translate_plural( 'baba', 'babas', 999 ) ); 101 // proper101 // Proper. 102 102 $this->assertEquals( 'dyadox', $domain->translate_plural( 'dyado', 'dyados', 1 ) ); 103 103 $this->assertEquals( 'dyadoy', $domain->translate_plural( 'dyado', 'dyados', 0 ) );
Note: See TracChangeset
for help on using the changeset viewer.