From 4102961cb5e31f88f74fa4794ade7c6509dabc4c Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 6 Jul 2015 22:43:52 -0400 Subject: [PATCH] Add tests for #6879 I wasn't able to reproduce the issue the reporter had, but we have more robust tests now. --- lib/Cake/Test/Case/Utility/InflectorTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Cake/Test/Case/Utility/InflectorTest.php b/lib/Cake/Test/Case/Utility/InflectorTest.php index bf7cd11c08b..13a32ffa436 100644 --- a/lib/Cake/Test/Case/Utility/InflectorTest.php +++ b/lib/Cake/Test/Case/Utility/InflectorTest.php @@ -287,6 +287,9 @@ public function testInflectingPlurals() { 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 @@ public function testPluralizeMultiWordIrregular() { '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')); } /**