mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Add tests for #6879
I wasn't able to reproduce the issue the reporter had, but we have more robust tests now.
This commit is contained in:
parent
5b31eff00c
commit
4102961cb5
1 changed files with 7 additions and 0 deletions
|
@ -287,6 +287,9 @@ class InflectorTest extends CakeTestCase {
|
|||
public function testPluralizeMultiWordIrregular() {
|
||||
Inflector::rules('plural', array(
|
||||
'irregular' => array(
|
||||
'mytable1' => 'mytables1',
|
||||
'mytable2' => 'mytables2',
|
||||
'mytable1_mytable2' => 'mytables1_mytables2',
|
||||
'pregunta_frecuente' => 'preguntas_frecuentes',
|
||||
'categoria_pregunta_frecuente' => 'categorias_preguntas_frecuentes',
|
||||
)
|
||||
|
@ -300,6 +303,10 @@ class InflectorTest extends CakeTestCase {
|
|||
'faq_categorias_preguntas_frecuentes',
|
||||
Inflector::pluralize('faq_categoria_pregunta_frecuente')
|
||||
);
|
||||
$this->assertEquals('mytables1', Inflector::pluralize('mytable1'));
|
||||
$this->assertEquals('mytables2', Inflector::pluralize('mytable2'));
|
||||
$this->assertEquals('mytables1_mytables2', Inflector::pluralize('mytable1_mytable2'));
|
||||
$this->assertEquals('mytables1_mytables2', Inflector::tableize('Mytable1Mytable2'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue