mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge branch '1.3-inflector' into 1.3
This commit is contained in:
commit
c7050c9879
3 changed files with 5 additions and 4 deletions
|
@ -44,8 +44,8 @@
|
|||
/**
|
||||
* As of 1.3, additional rules for the inflector are added below
|
||||
*
|
||||
* Inflector::rule('singular', array('rules' => array(), irregular' => array(), 'uninflected' => array()));
|
||||
* Inflector::rule('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
|
||||
* Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
|
||||
* Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
|
||||
*
|
||||
*/
|
||||
?>
|
||||
?>
|
|
@ -126,7 +126,7 @@ class Inflector extends Object {
|
|||
'/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|viri?)i$/i' => '\1us',
|
||||
'/([ftw]ax)es/' => '\1',
|
||||
'/(cris|ax|test)es$/i' => '\1is',
|
||||
'/(shoe)s$/i' => '\1',
|
||||
'/(shoe|slave)s$/i' => '\1',
|
||||
'/(o)es$/i' => '\1',
|
||||
'/ouses$/' => 'ouse',
|
||||
'/uses$/' => 'us',
|
||||
|
|
|
@ -105,6 +105,7 @@ class InflectorTest extends CakeTestCase {
|
|||
$this->assertEqual(Inflector::singularize('lives'), 'life');
|
||||
$this->assertEqual(Inflector::singularize('knives'), 'knife');
|
||||
$this->assertEqual(Inflector::singularize('wolves'), 'wolf');
|
||||
$this->assertEqual(Inflector::singularize('slaves'), 'slave');
|
||||
$this->assertEqual(Inflector::singularize('shelves'), 'shelf');
|
||||
$this->assertEqual(Inflector::singularize('taxis'), 'taxi');
|
||||
$this->assertEqual(Inflector::singularize('taxes'), 'tax');
|
||||
|
|
Loading…
Reference in a new issue