mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding test cases and fixing inflection issues with bases. Tests added. Fixes #1012
This commit is contained in:
parent
d1028a7434
commit
1b41a987fa
2 changed files with 4 additions and 1 deletions
|
@ -133,7 +133,7 @@ class Inflector {
|
|||
'/(drive)s$/i' => '\1',
|
||||
'/([^fo])ves$/i' => '\1fe',
|
||||
'/(^analy)ses$/i' => '\1sis',
|
||||
'/(analy|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis',
|
||||
'/(analy|ba|diagno|(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',
|
||||
|
|
|
@ -112,6 +112,9 @@ class InflectorTest extends CakeTestCase {
|
|||
$this->assertEqual(Inflector::singularize('parantheses'), 'paranthesis');
|
||||
$this->assertEqual(Inflector::singularize('Causes'), 'Cause');
|
||||
$this->assertEqual(Inflector::singularize('colossuses'), 'colossus');
|
||||
$this->assertEqual(Inflector::singularize('diagnoses'), 'diagnosis');
|
||||
$this->assertEqual(Inflector::singularize('bases'), 'basis');
|
||||
$this->assertEqual(Inflector::singularize('analyses'), 'analysis');
|
||||
|
||||
$this->assertEqual(Inflector::singularize(''), '');
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue