Skip to content

Commit

Permalink
Updates Inflector For Irregular Case Sieves
Browse files Browse the repository at this point in the history
Sieves incorrectly singualrized as sief.
Adds sieve, sieves as an irregular case and test cases to
match for the Inflector class.
Closes Issue #6240 in CakePHP 2.6 Branch

Signed-off-by: Justin Yost <justin.yost@yostivanich.com>
  • Loading branch information
justinyost committed Apr 1, 2015
1 parent 758820d commit f32d1c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/Cake/Test/Case/Utility/InflectorTest.php
Expand Up @@ -177,6 +177,7 @@ public function testInflectingSingulars() {
$this->assertEquals(Inflector::singularize('body_curves'), 'body_curve');
$this->assertEquals(Inflector::singularize('metadata'), 'metadata');
$this->assertEquals(Inflector::singularize('files_metadata'), 'files_metadata');
$this->assertEquals(Inflector::singularize('sieves'), 'sieve');
$this->assertEquals(Inflector::singularize(''), '');
}

Expand Down Expand Up @@ -248,6 +249,7 @@ public function testInflectingPlurals() {
$this->assertEquals(Inflector::pluralize('metadata'), 'metadata');
$this->assertEquals(Inflector::pluralize('files_metadata'), 'files_metadata');
$this->assertEquals(Inflector::pluralize('stadia'), 'stadia');
$this->assertEquals(Inflector::pluralize('sieve'), 'sieves');
$this->assertEquals(Inflector::pluralize(''), '');
}

Expand Down
3 changes: 2 additions & 1 deletion lib/Cake/Utility/Inflector.php
Expand Up @@ -107,7 +107,8 @@ class Inflector {
'hero' => 'heroes',
'tooth' => 'teeth',
'goose' => 'geese',
'foot' => 'feet'
'foot' => 'feet',
'sieve' => 'sieves'
)
);

Expand Down

0 comments on commit f32d1c1

Please sign in to comment.