Correct inflection rules for cookies, fixes fixes #3291

This commit is contained in:
Jose Lorenzo Rodriguez 2012-10-22 23:07:42 +02:00
parent 08556ab879
commit 9dc3b243ac
2 changed files with 4 additions and 1 deletions

View file

@ -109,6 +109,7 @@ class InflectorTest extends CakeTestCase {
$this->assertEquals(Inflector::singularize('roofs'), 'roof');
$this->assertEquals(Inflector::singularize('foes'), 'foe');
$this->assertEquals(Inflector::singularize('databases'), 'database');
$this->assertEquals(Inflector::singularize('cookies'), 'cookie');
$this->assertEquals(Inflector::singularize(''), '');
}
@ -160,6 +161,7 @@ class InflectorTest extends CakeTestCase {
$this->assertEquals(Inflector::pluralize('cafe'), 'cafes');
$this->assertEquals(Inflector::pluralize('roof'), 'roofs');
$this->assertEquals(Inflector::pluralize('foe'), 'foes');
$this->assertEquals(Inflector::pluralize('cookie'), 'cookie');
$this->assertEquals(Inflector::pluralize(''), '');
}

View file

@ -55,7 +55,7 @@ class Inflector {
'/$/' => 's',
),
'uninflected' => array(
'.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep', 'people'
'.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep', 'people', 'cookie'
),
'irregular' => array(
'atlas' => 'atlases',
@ -63,6 +63,7 @@ class Inflector {
'brother' => 'brothers',
'cafe' => 'cafes',
'child' => 'children',
'cookie' => 'cookies',
'corpus' => 'corpuses',
'cow' => 'cows',
'ganglion' => 'ganglions',