Changeset 45607 for trunk/tests/phpunit/tests/pomo/pluralForms.php
- Timestamp:
- 07/08/2019 12:55:20 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/pomo/pluralForms.php
r42343 r45607 61 61 foreach ( $locales as $slug => $locale ) { 62 62 $plural_expression = $locale->plural_expression; 63 if ( $plural_expression !== 'n != 1') {63 if ( 'n != 1' !== $plural_expression ) { 64 64 $plural_expressions[] = array( $slug, $locale->nplurals, $plural_expression ); 65 65 } … … 83 83 $parenthesized = self::parenthesize_plural_expression( $expression ); 84 84 $old_style = tests_make_plural_form_function( $nplurals, $parenthesized ); 85 $plural Forms= new Plural_Forms( $expression );85 $plural_forms = new Plural_Forms( $expression ); 86 86 87 87 $generated_old = array(); … … 90 90 foreach ( range( 0, 200 ) as $i ) { 91 91 $generated_old[] = $old_style( $i ); 92 $generated_new[] = $plural Forms->get( $i );92 $generated_new[] = $plural_forms->get( $i ); 93 93 } 94 94 … … 152 152 */ 153 153 public function test_simple( $expression, $expected ) { 154 $plural Forms = new Plural_Forms( $expression );155 $actual = array();154 $plural_forms = new Plural_Forms( $expression ); 155 $actual = array(); 156 156 foreach ( array_keys( $expected ) as $num ) { 157 $actual[ $num ] = $plural Forms->get( $num );157 $actual[ $num ] = $plural_forms->get( $num ); 158 158 } 159 159 … … 213 213 public function test_exceptions( $expression, $expected_exception, $call_get ) { 214 214 try { 215 $plural Forms = new Plural_Forms( $expression );215 $plural_forms = new Plural_Forms( $expression ); 216 216 if ( $call_get ) { 217 $plural Forms->get( 1 );217 $plural_forms->get( 1 ); 218 218 } 219 219 } catch ( Exception $e ) {
Note: See TracChangeset
for help on using the changeset viewer.