From bb2fcfcbc3278a60603f7aa792c6700732f7f03c Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Fri, 27 Nov 2009 06:12:07 +0000 Subject: [PATCH] unit tests 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 a03106b4b3e..56e0543010f 100644 --- a/lib/simpletest/testmoodlelib.php +++ b/lib/simpletest/testmoodlelib.php @@ -256,6 +256,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)); } }