Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix singularization of databases.

Fixes #2822
  • Loading branch information...
commit 13468937cce7869990d017eadfecf6e5a859cc99 1 parent 3627512
Mark Story markstory authored
1  lib/Cake/Test/Case/Utility/InflectorTest.php
View
@@ -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(''), '');
}
2  lib/Cake/Utility/Inflector.php
View
@@ -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',
Please sign in to comment.
Something went wrong with that request. Please try again.