From 1fca8fa5fc8a3724fb5463b8f4698f65cc5185ab Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Tue, 24 Nov 2009 08:07:41 +0000 Subject: [PATCH] lib MDL-20537 Added another unit test for shorten_text --- lib/simpletest/testmoodlelib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/simpletest/testmoodlelib.php b/lib/simpletest/testmoodlelib.php index 7b250d1541..b3cab058c5 100644 --- a/lib/simpletest/testmoodlelib.php +++ b/lib/simpletest/testmoodlelib.php @@ -380,6 +380,10 @@ class moodlelib_test extends UnitTestCase { $text = "

standard 'break-out' sub groups in TGs?

 <<There are several"; $this->assertEqual("

standard 'break-out' sub groups in ...

", shorten_text($text, 43)); + + $text = "

123456789

";//a string with no convenient breaks + $this->assertEqual("

12345...

", + shorten_text($text, 8)); } } -- 2.39.5