diff --git a/cake/tests/cases/libs/view/helpers/text.test.php b/cake/tests/cases/libs/view/helpers/text.test.php index 43c6a048f..748754073 100644 --- a/cake/tests/cases/libs/view/helpers/text.test.php +++ b/cake/tests/cases/libs/view/helpers/text.test.php @@ -74,30 +74,32 @@ class TextHelperTest extends CakeTestCase { $text6 = '
Extra dates have been announced for this year\'s tour.
Tickets for the new shows in
'; $text7 = 'El moño está en el lugar correcto. Eso fue lo que dijo la niña, ¿habrá dicho la verdad?'; $text8 = 'Vive la R'.chr(195).chr(169).'publique de France'; + $text9 = 'НОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; - $this->assertIdentical($this->Text->{$m}($text1, 15), 'The quick br...'); - $this->assertIdentical($this->Text->{$m}($text1, 15, '...', false), 'The quick...'); - $this->assertIdentical($this->Text->{$m}($text1, 100), 'The quick brown fox jumps over the lazy dog'); - $this->assertIdentical($this->Text->{$m}($text2, 10, '...'), 'Heiz&ou...'); - $this->assertIdentical($this->Text->{$m}($text2, 10, '...', false), '...'); - $this->assertIdentical($this->Text->{$m}($text3, 20), '© 2005-20...'); - $this->assertIdentical($this->Text->{$m}($text4, 15), ' This image ...'); - $this->assertIdentical($this->Text->{$m}($text4, 45, '...', true, true), ' This image tag is not XHTML conform!Extra dates have been announced for this year's...
"); - $this->assertIdentical($this->Text->{$m}($text7, 255), $text7); - $this->assertIdentical($this->Text->{$m}($text7, 15), 'El moño está...'); - $this->assertIdentical($this->Text->{$m}($text8, 15), 'Vive la R'.chr(195).chr(169).'pu...'); + $this->assertIdentical($this->Text->truncate($text1, 15), 'The quick br...'); + $this->assertIdentical($this->Text->truncate($text1, 15, '...', false), 'The quick...'); + $this->assertIdentical($this->Text->truncate($text1, 100), 'The quick brown fox jumps over the lazy dog'); + $this->assertIdentical($this->Text->truncate($text2, 10, '...'), 'Heiz&ou...'); + $this->assertIdentical($this->Text->truncate($text2, 10, '...', false), '...'); + $this->assertIdentical($this->Text->truncate($text3, 20), '© 2005-20...'); + $this->assertIdentical($this->Text->truncate($text4, 15), ' This image ...'); + $this->assertIdentical($this->Text->truncate($text4, 45, '...', true, true), ' This image tag is not XHTML conform!Extra dates have been announced for this year's...
"); + $this->assertIdentical($this->Text->truncate($text7, 255), $text7); + $this->assertIdentical($this->Text->truncate($text7, 15), 'El moño está...'); + $this->assertIdentical($this->Text->truncate($text8, 15), 'Vive la R'.chr(195).chr(169).'pu...'); + $this->assertIdentical($this->Text->truncate($text9, 10), 'НОПРСТУ...'); } /**