From a683f661ed46a5f873bca5298a58ea7adcda554f Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Mon, 15 Feb 2016 14:39:28 +0100 Subject: [PATCH] Add truncate and truncateHtml tests for input type --- tests/unit/Grav/Common/UtilsTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unit/Grav/Common/UtilsTest.php b/tests/unit/Grav/Common/UtilsTest.php index 1ad4fd8b4..7a29cb074 100644 --- a/tests/unit/Grav/Common/UtilsTest.php +++ b/tests/unit/Grav/Common/UtilsTest.php @@ -109,6 +109,7 @@ class UtilsTest extends \Codeception\TestCase\Test $this->assertEquals('english', Utils::truncate('english')); $this->assertEquals('This is a string to truncate', Utils::truncate('This is a string to truncate')); $this->assertEquals('This ', Utils::truncate('This is a string to truncate', 3, true)); + $this->assertEquals('', 6, true)); } @@ -123,6 +124,7 @@ class UtilsTest extends \Codeception\TestCase\Test { $this->assertEquals('

T…

', Utils::truncateHtml('

This is a string to truncate

', 1)); $this->assertEquals('

This…

', Utils::truncateHtml('

This is a string to truncate

', 4)); + $this->assertEquals('', Utils::truncateHtml('', 6, true)); }