Skip to content
This repository
Browse code

Fix singularization of 'foes'

Fixes #2424
  • Loading branch information...
commit 049b04dabfc984f62006e3268039332cea557709 1 parent 5ac77c2
Mark Story authored January 05, 2012
1  cake/libs/inflector.php
@@ -148,6 +148,7 @@ class Inflector {
148 148
 			'.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep', '.*ss'
149 149
 		),
150 150
 		'irregular' => array(
  151
+			'foes' => 'foe',
151 152
 			'waves' => 'wave',
152 153
 			'curves' => 'curve'
153 154
 		)
2  cake/tests/cases/libs/inflector.test.php
@@ -119,6 +119,7 @@ function testInflectingSingulars() {
119 119
 		$this->assertEqual(Inflector::singularize('curves'), 'curve');
120 120
 		$this->assertEqual(Inflector::singularize('cafes'), 'cafe');
121 121
 		$this->assertEqual(Inflector::singularize('roofs'), 'roof');
  122
+		$this->assertEqual(Inflector::singularize('foes'), 'foe');
122 123
 
123 124
 		$this->assertEqual(Inflector::singularize(''), '');
124 125
 	}
@@ -170,6 +171,7 @@ function testInflectingPlurals() {
170 171
 		$this->assertEqual(Inflector::pluralize('bureau'), 'bureaus');
171 172
 		$this->assertEqual(Inflector::pluralize('cafe'), 'cafes');
172 173
 		$this->assertEqual(Inflector::pluralize('roof'), 'roofs');
  174
+		$this->assertEqual(Inflector::pluralize('foe'), 'foes');
173 175
 		$this->assertEqual(Inflector::pluralize(''), '');
174 176
 	}
175 177
 

0 notes on commit 049b04d

Please sign in to comment.
Something went wrong with that request. Please try again.