mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing inflection of words ending in analysis. Fixes #619
This commit is contained in:
parent
2fab47e740
commit
328c58635b
2 changed files with 5 additions and 1 deletions
|
@ -133,7 +133,7 @@ class Inflector {
|
|||
'/(drive)s$/i' => '\1',
|
||||
'/([^fo])ves$/i' => '\1fe',
|
||||
'/(^analy)ses$/i' => '\1sis',
|
||||
'/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis',
|
||||
'/(analy|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis',
|
||||
'/([ti])a$/i' => '\1um',
|
||||
'/(p)eople$/i' => '\1\2erson',
|
||||
'/(m)en$/i' => '\1an',
|
||||
|
|
|
@ -116,6 +116,10 @@ class InflectorTest extends CakeTestCase {
|
|||
$this->assertEqual(Inflector::singularize('niches'), 'niche');
|
||||
$this->assertEqual(Inflector::singularize('waves'), 'wave');
|
||||
$this->assertEqual(Inflector::singularize('bureaus'), 'bureau');
|
||||
$this->assertEqual(Inflector::singularize('genetic_analyses'), 'genetic_analysis');
|
||||
$this->assertEqual(Inflector::singularize('doctor_diagnoses'), 'doctor_diagnosis');
|
||||
$this->assertEqual(Inflector::singularize('parantheses'), 'paranthesis');
|
||||
|
||||
$this->assertEqual(Inflector::singularize(''), '');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue