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!

'), ); }