Skip to content

Commit

Permalink
Merge pull request #1204 from DrRoach/dev
Browse files Browse the repository at this point in the history
Fixed issue where tax would pluralize to taxis not taxes.
  • Loading branch information
mariuswilms committed Jul 9, 2015
2 parents 34b2248 + 140e995 commit b49ad94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/cases/util/InflectorTest.php
Expand Up @@ -63,6 +63,7 @@ public function testSingularize() {
$this->assertEqual(Inflector::singularize('shelves'), 'shelf');
$this->assertEqual(Inflector::singularize('causes'), 'cause');
$this->assertEqual(Inflector::singularize(''), '');
$this->assertEqual(Inflector::singularize('taxes'), 'tax');
}

/**
Expand Down Expand Up @@ -105,6 +106,7 @@ public function testPluralize() {
$this->assertEqual(Inflector::pluralize('leaf'), 'leaves');
$this->assertEqual(Inflector::pluralize('ContactPeople'), 'ContactPeople');
$this->assertEqual(Inflector::pluralize(''), '');
$this->assertEqual(Inflector::pluralize('tax'), 'taxes');

$result = Inflector::pluralize('errata');
$this->assertNull(Inflector::rules('plural', array('/rata/' => '\1ratum')));
Expand Down Expand Up @@ -359,4 +361,4 @@ protected function _getProtectedValue($property) {
}
}

?>
?>
4 changes: 2 additions & 2 deletions util/Inflector.php
Expand Up @@ -180,7 +180,7 @@ class Inflector {
'mythos' => 'mythoi', 'numen' => 'numina', 'occiput' => 'occiputs',
'octopus' => 'octopuses', 'opus' => 'opuses', 'ox' => 'oxen', 'penis' => 'penises',
'person' => 'people', 'sex' => 'sexes', 'soliloquy' => 'soliloquies',
'testis' => 'testes', 'trilby' => 'trilbys', 'turf' => 'turfs'
'tax' => 'taxes', 'testis' => 'testes', 'trilby' => 'trilbys', 'turf' => 'turfs'
),
'uninflected' => array(
'.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep'
Expand Down Expand Up @@ -478,4 +478,4 @@ protected static function _enclose($string) {
}
}

?>
?>

0 comments on commit b49ad94

Please sign in to comment.