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 edf37e7 commit e649a05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Cake/Test/Case/Utility/InflectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public function testInflectingSingulars() {
$this->assertEquals(Inflector::singularize('curves'), 'curve');
$this->assertEquals(Inflector::singularize('cafes'), 'cafe');
$this->assertEquals(Inflector::singularize('roofs'), 'roof');
$this->assertEquals(Inflector::singularize('foes'), 'foe');

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

Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Utility/Inflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class Inflector {
'.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep', '.*ss'
),
'irregular' => array(
'foes' => 'foe',
'waves' => 'wave',
'curves' => 'curve'
)
Expand Down

0 comments on commit e649a05

Please sign in to comment.