diff --git a/cake/libs/inflector.php b/cake/libs/inflector.php index 91c7e98ab..71f07b4e3 100644 --- a/cake/libs/inflector.php +++ b/cake/libs/inflector.php @@ -318,7 +318,8 @@ class Inflector extends Object { 'nexus', 'Niasese', 'Pekingese', 'Piedmontese', 'pincers', 'Pistoiese', 'pliers', 'Portuguese', 'proceedings', 'rabies', 'rice', 'rhinoceros', 'salmon', 'Sarawakese', 'scissors', 'sea[- ]bass', 'series', 'Shavese', 'shears', 'siemens', 'species', 'swine', 'testes', 'trousers', 'trout', 'tuna', 'Vermontese', 'Wenchowese', - 'whiting', 'wildebeest', 'Yengeese'); + 'whiting', 'wildebeest', 'Yengeese' + ); $coreIrregularSingular = array( 'atlases' => 'atlas', @@ -349,7 +350,9 @@ class Inflector extends Object { 'soliloquies' => 'soliloquy', 'testes' => 'testis', 'trilbys' => 'trilby', - 'turfs' => 'turf'); + 'turfs' => 'turf', + 'waves' => 'wave' + ); $singularRules = Set::pushDiff($this->__singularRules, $coreSingularRules); $uninflected = Set::pushDiff($this->__uninflectedSingular, $coreUninflectedSingular); diff --git a/cake/tests/cases/libs/inflector.test.php b/cake/tests/cases/libs/inflector.test.php index 9aa007187..2c293bb53 100644 --- a/cake/tests/cases/libs/inflector.test.php +++ b/cake/tests/cases/libs/inflector.test.php @@ -108,6 +108,7 @@ class InflectorTest extends CakeTestCase { $this->assertEqual(Inflector::singularize('taxes'), 'tax'); $this->assertEqual(Inflector::singularize('faxes'), 'fax'); $this->assertEqual(Inflector::singularize('waxes'), 'wax'); + $this->assertEqual(Inflector::singularize('waves'), 'wave'); $this->assertEqual(Inflector::singularize(''), ''); } /** @@ -151,6 +152,7 @@ class InflectorTest extends CakeTestCase { $this->assertEqual(Inflector::pluralize('people'), 'people'); $this->assertEqual(Inflector::pluralize('glove'), 'gloves'); $this->assertEqual(Inflector::pluralize('crisis'), 'crises'); + $this->assertEqual(Inflector::pluralize('wave'), 'waves'); $this->assertEqual(Inflector::pluralize(''), ''); } /**