Skip to content
Permalink
Browse files

Updates Inflector For Irregular Case Sieves

Sieves incorrectly singualrized as sief.
Adds sieve, sieves as an irregular case and test cases to
match for the Inflector class.
References #6240

Signed-off-by: Justin Yost <justin.yost@yostivanich.com>
  • Loading branch information...
justinyost committed Apr 1, 2015
1 parent 4604761 commit 52e334347e063aa20130c1cdae37a9cc7d50c49a
Showing with 4 additions and 1 deletion.
  1. +2 −1 src/Utility/Inflector.php
  2. +2 −0 tests/TestCase/Utility/InflectorTest.php
@@ -142,7 +142,8 @@ class Inflector
'tooth' => 'teeth',
'goose' => 'geese',
'foot' => 'feet',
'foe' => 'foes'
'foe' => 'foes',
'sieve' => 'sieves'
];
/**
@@ -174,6 +174,7 @@ public function testInflectingSingulars()
$this->assertEquals('metadata', Inflector::singularize('metadata'));
$this->assertEquals('files_metadata', Inflector::singularize('files_metadata'));
$this->assertEquals('address', Inflector::singularize('addresses'));
$this->assertEquals('sieve', Inflector::singularize('sieves'));
$this->assertEquals('', Inflector::singularize(''));
}
@@ -251,6 +252,7 @@ public function testInflectingPlurals()
$this->assertEquals('files_metadata', Inflector::pluralize('files_metadata'));
$this->assertEquals('stadia', Inflector::pluralize('stadia'));
$this->assertEquals('Addresses', Inflector::pluralize('Address'));
$this->assertEquals('sieves', Inflector::pluralize('sieve'));
$this->assertEquals('', Inflector::pluralize(''));
}

0 comments on commit 52e3343

Please sign in to comment.
You can’t perform that action at this time.