Permalink
Browse files

Fix pluralization of Objective.

Fixes #3921
  • Loading branch information...
1 parent aa18a53 commit 7b5122adb19615e8e740b688164d0d259aff668f @markstory markstory committed Jul 17, 2013
Showing with 3 additions and 1 deletion.
  1. +2 −0 lib/Cake/Test/Case/Utility/InflectorTest.php
  2. +1 −1 lib/Cake/Utility/Inflector.php
@@ -117,6 +117,7 @@ public function testInflectingSingulars() {
$this->assertEquals(Inflector::singularize('teeth'), 'tooth');
$this->assertEquals(Inflector::singularize('geese'), 'goose');
$this->assertEquals(Inflector::singularize('feet'), 'foot');
+ $this->assertEquals(Inflector::singularize('objectives'), 'objective');
$this->assertEquals(Inflector::singularize(''), '');
}
@@ -177,6 +178,7 @@ public function testInflectingPlurals() {
$this->assertEquals(Inflector::pluralize('tooth'), 'teeth');
$this->assertEquals(Inflector::pluralize('goose'), 'geese');
$this->assertEquals(Inflector::pluralize('foot'), 'feet');
+ $this->assertEquals(Inflector::pluralize('objective'), 'objectives');
$this->assertEquals(Inflector::pluralize(''), '');
}
@@ -125,9 +125,9 @@ class Inflector {
'/(m)ovies$/i' => '\1\2ovie',
'/(s)eries$/i' => '\1\2eries',
'/([^aeiouy]|qu)ies$/i' => '\1y',
+ '/(tive)s$/i' => '\1',
'/([lre])ves$/i' => '\1f',
'/([^fo])ves$/i' => '\1fe',
- '/(tive)s$/i' => '\1',
'/(hive)s$/i' => '\1',
'/(drive)s$/i' => '\1',
'/(^analy)ses$/i' => '\1sis',

2 comments on commit 7b5122a

Member

dereuromark replied Jul 17, 2013

Will someone update inflector.cakephp.org to work with the current 2.4 branch - including the changes?
I already made the necessary code changes - someone just have to deploy em :)

Owner

markstory replied Jul 17, 2013

I'm not entirely sure how that site gets deployed. Hopefully its a jenkins task that does the work on push.

Please sign in to comment.