From: Andrew Davis Date: Tue, 24 Nov 2009 08:07:41 +0000 (+0000) Subject: lib MDL-20537 Added another unit test for shorten_text X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1fca8fa5fc8a3724fb5463b8f4698f65cc5185ab;p=moodle.git lib MDL-20537 Added another unit test for shorten_text --- 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)); } }