Skip to content

Commit

Permalink
Fix singularization of 'foes'
Browse files Browse the repository at this point in the history
Fixes #2424
  • Loading branch information
markstory committed Jan 6, 2012
1 parent 5ac77c2 commit 049b04d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cake/libs/inflector.php
Expand Up @@ -148,6 +148,7 @@ class Inflector {
'.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep', '.*ss'
),
'irregular' => array(
'foes' => 'foe',
'waves' => 'wave',
'curves' => 'curve'
)
Expand Down
2 changes: 2 additions & 0 deletions cake/tests/cases/libs/inflector.test.php
Expand Up @@ -119,6 +119,7 @@ function testInflectingSingulars() {
$this->assertEqual(Inflector::singularize('curves'), 'curve');
$this->assertEqual(Inflector::singularize('cafes'), 'cafe');
$this->assertEqual(Inflector::singularize('roofs'), 'roof');
$this->assertEqual(Inflector::singularize('foes'), 'foe');

$this->assertEqual(Inflector::singularize(''), '');
}
Expand Down Expand Up @@ -170,6 +171,7 @@ function testInflectingPlurals() {
$this->assertEqual(Inflector::pluralize('bureau'), 'bureaus');
$this->assertEqual(Inflector::pluralize('cafe'), 'cafes');
$this->assertEqual(Inflector::pluralize('roof'), 'roofs');
$this->assertEqual(Inflector::pluralize('foe'), 'foes');
$this->assertEqual(Inflector::pluralize(''), '');
}

Expand Down

0 comments on commit 049b04d

Please sign in to comment.