mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fixing inflection of Taxes. Fixes #15
This commit is contained in:
parent
9d1e556486
commit
2893b29e11
2 changed files with 3 additions and 1 deletions
|
@ -124,7 +124,7 @@ class Inflector extends Object {
|
|||
'/^(ox)en/i' => '\1',
|
||||
'/(alias)(es)*$/i' => '\1',
|
||||
'/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|viri?)i$/i' => '\1us',
|
||||
'/([ftw]ax)es/' => '\1',
|
||||
'/([ftw]ax)es/i' => '\1',
|
||||
'/(cris|ax|test)es$/i' => '\1is',
|
||||
'/(shoe|slave)s$/i' => '\1',
|
||||
'/(o)es$/i' => '\1',
|
||||
|
|
|
@ -109,6 +109,7 @@ class InflectorTest extends CakeTestCase {
|
|||
$this->assertEqual(Inflector::singularize('shelves'), 'shelf');
|
||||
$this->assertEqual(Inflector::singularize('taxis'), 'taxi');
|
||||
$this->assertEqual(Inflector::singularize('taxes'), 'tax');
|
||||
$this->assertEqual(Inflector::singularize('Taxes'), 'Tax');
|
||||
$this->assertEqual(Inflector::singularize('faxes'), 'fax');
|
||||
$this->assertEqual(Inflector::singularize('waxes'), 'wax');
|
||||
$this->assertEqual(Inflector::singularize('niches'), 'niche');
|
||||
|
@ -156,6 +157,7 @@ class InflectorTest extends CakeTestCase {
|
|||
$this->assertEqual(Inflector::pluralize('people'), 'people');
|
||||
$this->assertEqual(Inflector::pluralize('glove'), 'gloves');
|
||||
$this->assertEqual(Inflector::pluralize('crisis'), 'crises');
|
||||
$this->assertEqual(Inflector::pluralize('tax'), 'taxes');
|
||||
$this->assertEqual(Inflector::pluralize(''), '');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue