From f3b26a7b4049bbd55764253308561244a08d7541 Mon Sep 17 00:00:00 2001 From: Tim Kelty Date: Wed, 18 Oct 2017 11:27:08 -0400 Subject: [PATCH] Use actual ellipses. --- src/TruncateInterface.php | 2 +- src/TruncateService.php | 2 +- tests/TruncateServiceTest.php | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/TruncateInterface.php b/src/TruncateInterface.php index a3b02db..4aaccba 100644 --- a/src/TruncateInterface.php +++ b/src/TruncateInterface.php @@ -34,7 +34,7 @@ interface TruncateInterface public function truncate( $text, $length = 100, - $ending = '...', + $ending = '…', $exact = false, $considerHtml = true ); diff --git a/src/TruncateService.php b/src/TruncateService.php index 0f5b8d9..d876c5e 100644 --- a/src/TruncateService.php +++ b/src/TruncateService.php @@ -37,7 +37,7 @@ public static function create() public function truncate( $text, $length = 100, - $ending = '...', + $ending = '…', $exact = false, $considerHtml = true ) { diff --git a/tests/TruncateServiceTest.php b/tests/TruncateServiceTest.php index 4dec2a5..4fe9b06 100644 --- a/tests/TruncateServiceTest.php +++ b/tests/TruncateServiceTest.php @@ -36,11 +36,11 @@ public function setUp() public function provider() { return array( - array('

Hello world!

', 10, '

Hello...

'), + array('

Hello world!

', 10, '

Hello…

'), array('

Hello world!

', 30, '

Hello world!

'), - array('

Hello World! blah blah blah

', 20, '

Hello World!...

'), - array('OneTwo Three', 10, 'OneTwo...'), - array('

Hello world!

', 10, '

Hello...

'), + array('

Hello World! blah blah blah

', 20, '

Hello World!

'), + array('OneTwo Three', 10, 'OneTwo…'), + array('

Hello world!

', 10, '

Hello…

'), array('

Hello world!

', 20, '

Hello world!

'), ); }