Adding cafe to the list of irregular plurals. Seems that its

french origins befuddle normal english pluralization rules.
Fixes #1930
This commit is contained in:
mark_story 2011-08-28 21:45:16 -04:00
parent 27ab9093b5
commit 5b43d6b9a7
2 changed files with 5 additions and 0 deletions

View file

@ -70,6 +70,7 @@ class Inflector {
'atlas' => 'atlases',
'beef' => 'beefs',
'brother' => 'brothers',
'cafe' => 'cafes',
'child' => 'children',
'corpus' => 'corpuses',
'cow' => 'cows',

View file

@ -116,6 +116,8 @@ class InflectorTest extends CakeTestCase {
$this->assertEqual(Inflector::singularize('bases'), 'basis');
$this->assertEqual(Inflector::singularize('analyses'), 'analysis');
$this->assertEqual(Inflector::singularize('curves'), 'curve');
$this->assertEqual(Inflector::singularize('cafes'), 'cafe');
$this->assertEqual(Inflector::singularize('roofs'), 'roof');
$this->assertEqual(Inflector::singularize(''), '');
}
@ -164,6 +166,8 @@ class InflectorTest extends CakeTestCase {
$this->assertEqual(Inflector::pluralize('tax'), 'taxes');
$this->assertEqual(Inflector::pluralize('wave'), 'waves');
$this->assertEqual(Inflector::pluralize('bureau'), 'bureaus');
$this->assertEqual(Inflector::pluralize('cafe'), 'cafes');
$this->assertEqual(Inflector::pluralize('roof'), 'roofs');
$this->assertEqual(Inflector::pluralize(''), '');
}