Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Correct inflection rules for cookies, fixes fixes #3291

  • Loading branch information...
commit 9dc3b243ac33b19131a6ac28afabd7e945f72cda 1 parent 08556ab
@lorenzo lorenzo authored
View
2  lib/Cake/Test/Case/Utility/InflectorTest.php
@@ -109,6 +109,7 @@ public function testInflectingSingulars() {
$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 @@ public function testInflectingPlurals() {
$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
3  lib/Cake/Utility/Inflector.php
@@ -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',
Please sign in to comment.
Something went wrong with that request. Please try again.