mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Correct inflection rules for cookies, fixes fixes #3291
This commit is contained in:
parent
08556ab879
commit
9dc3b243ac
2 changed files with 4 additions and 1 deletions
|
@ -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(''), '');
|
||||
}
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue