Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix singularization of 'foes'

Fixes #2424
  • Loading branch information...
commit 049b04dabfc984f62006e3268039332cea557709 1 parent 5ac77c2
Mark Story markstory authored
1  cake/libs/inflector.php
View
@@ -148,6 +148,7 @@ class Inflector {
'.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep', '.*ss'
),
'irregular' => array(
+ 'foes' => 'foe',
'waves' => 'wave',
'curves' => 'curve'
)
2  cake/tests/cases/libs/inflector.test.php
View
@@ -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(''), '');
}
@@ -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(''), '');
}
Please sign in to comment.
Something went wrong with that request. Please try again.