mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing inflection of words ending in causes. Fixes #736
This commit is contained in:
parent
78653347b2
commit
23d4bafd39
2 changed files with 3 additions and 1 deletions
|
@ -121,7 +121,7 @@ class Inflector {
|
||||||
'/(shoe|slave)s$/i' => '\1',
|
'/(shoe|slave)s$/i' => '\1',
|
||||||
'/(o)es$/i' => '\1',
|
'/(o)es$/i' => '\1',
|
||||||
'/ouses$/' => 'ouse',
|
'/ouses$/' => 'ouse',
|
||||||
'/uses$/' => 'us',
|
'/([^a])uses$/' => '\1us',
|
||||||
'/([m|l])ice$/i' => '\1ouse',
|
'/([m|l])ice$/i' => '\1ouse',
|
||||||
'/(x|ch|ss|sh)es$/i' => '\1',
|
'/(x|ch|ss|sh)es$/i' => '\1',
|
||||||
'/(m)ovies$/i' => '\1\2ovie',
|
'/(m)ovies$/i' => '\1\2ovie',
|
||||||
|
|
|
@ -119,6 +119,8 @@ class InflectorTest extends CakeTestCase {
|
||||||
$this->assertEqual(Inflector::singularize('genetic_analyses'), 'genetic_analysis');
|
$this->assertEqual(Inflector::singularize('genetic_analyses'), 'genetic_analysis');
|
||||||
$this->assertEqual(Inflector::singularize('doctor_diagnoses'), 'doctor_diagnosis');
|
$this->assertEqual(Inflector::singularize('doctor_diagnoses'), 'doctor_diagnosis');
|
||||||
$this->assertEqual(Inflector::singularize('parantheses'), 'paranthesis');
|
$this->assertEqual(Inflector::singularize('parantheses'), 'paranthesis');
|
||||||
|
$this->assertEqual(Inflector::singularize('Causes'), 'Cause');
|
||||||
|
$this->assertEqual(Inflector::singularize('colossuses'), 'colossus');
|
||||||
|
|
||||||
$this->assertEqual(Inflector::singularize(''), '');
|
$this->assertEqual(Inflector::singularize(''), '');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue