Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing inflection of Taxes. Fixes #15

  • Loading branch information...
commit 2893b29e1148b58122b940fb4a1197f96c65f2e9 1 parent 9d1e556
@markstory markstory authored
View
2  cake/libs/inflector.php
@@ -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',
View
2  cake/tests/cases/libs/inflector.test.php
@@ -109,6 +109,7 @@ function testInflectingSingulars() {
$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 @@ function testInflectingPlurals() {
$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(''), '');
}
Please sign in to comment.
Something went wrong with that request. Please try again.