Skip to content

Commit

Permalink
Fix singularization of databases.
Browse files Browse the repository at this point in the history
Fixes #2822
  • Loading branch information
markstory committed Apr 24, 2012
1 parent 3627512 commit 1346893
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/Cake/Test/Case/Utility/InflectorTest.php
Expand Up @@ -108,6 +108,7 @@ public function testInflectingSingulars() {
$this->assertEquals(Inflector::singularize('cafes'), 'cafe');
$this->assertEquals(Inflector::singularize('roofs'), 'roof');
$this->assertEquals(Inflector::singularize('foes'), 'foe');
$this->assertEquals(Inflector::singularize('databases'), 'database');

$this->assertEquals(Inflector::singularize(''), '');
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Inflector.php
Expand Up @@ -124,7 +124,7 @@ class Inflector {
'/(drive)s$/i' => '\1',
'/([^fo])ves$/i' => '\1fe',
'/(^analy)ses$/i' => '\1sis',
'/(analy|ba|diagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis',
'/(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis',
'/([ti])a$/i' => '\1um',
'/(p)eople$/i' => '\1\2erson',
'/(m)en$/i' => '\1an',
Expand Down

0 comments on commit 1346893

Please sign in to comment.