Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix inflectino for words ending in media.

Fixes #2149
  • Loading branch information...
commit 7c96f87bd78dc46d69d26adbaa161b936f888a68 1 parent 8ff669d
@markstory markstory authored
View
4 cake/libs/inflector.php
@@ -165,12 +165,12 @@ class Inflector {
'debris', 'diabetes', 'djinn', 'eland', 'elk', 'equipment', 'Faroese', 'flounder',
'Foochowese', 'gallows', 'Genevese', 'Genoese', 'Gilbertese', 'graffiti',
'headquarters', 'herpes', 'hijinks', 'Hottentotese', 'information', 'innings',
- 'jackanapes', 'Kiplingese', 'Kongoese', 'Lucchese', 'mackerel', 'Maltese', 'media',
+ 'jackanapes', 'Kiplingese', 'Kongoese', 'Lucchese', 'mackerel', 'Maltese', '.*?media',
'mews', 'moose', 'mumps', 'Nankingese', 'news', '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',
+ 'trousers', 'trout', 'tuna', 'Vermontese', 'Wenchowese', 'whiting', 'wildebeest',
'Yengeese'
);
View
2  cake/tests/cases/libs/inflector.test.php
@@ -78,6 +78,7 @@ function testInflectingSingulars() {
$this->assertEqual(Inflector::singularize('Aliases'), 'Alias');
$this->assertEqual(Inflector::singularize('Alias'), 'Alias');
$this->assertEqual(Inflector::singularize('Media'), 'Media');
+ $this->assertEqual(Inflector::singularize('NodeMedia'), 'NodeMedia');
$this->assertEqual(Inflector::singularize('alumni'), 'alumnus');
$this->assertEqual(Inflector::singularize('bacilli'), 'bacillus');
$this->assertEqual(Inflector::singularize('cacti'), 'cactus');
@@ -147,6 +148,7 @@ function testInflectingPlurals() {
$this->assertEqual(Inflector::pluralize('Alias'), 'Aliases');
$this->assertEqual(Inflector::pluralize('Aliases'), 'Aliases');
$this->assertEqual(Inflector::pluralize('Media'), 'Media');
+ $this->assertEqual(Inflector::pluralize('NodeMedia'), 'NodeMedia');
$this->assertEqual(Inflector::pluralize('alumnus'), 'alumni');
$this->assertEqual(Inflector::pluralize('bacillus'), 'bacilli');
$this->assertEqual(Inflector::pluralize('cactus'), 'cacti');
Please sign in to comment.
Something went wrong with that request. Please try again.