|
@@ -588,19 +588,19 @@ TEXT;
|
|
|
{
|
|
{
|
|
|
$text = '<a href="http://example.org">hello</a> world';
|
|
$text = '<a href="http://example.org">hello</a> world';
|
|
|
$expected = '<a href="http://example.org">hell..</a>';
|
|
$expected = '<a href="http://example.org">hell..</a>';
|
|
|
- $result = Text::truncate($text, 6, array(
|
|
|
|
|
|
|
+ $result = Text::truncate($text, 6, [
|
|
|
'ellipsis' => '..',
|
|
'ellipsis' => '..',
|
|
|
'exact' => true,
|
|
'exact' => true,
|
|
|
'html' => true
|
|
'html' => true
|
|
|
- ));
|
|
|
|
|
|
|
+ ]);
|
|
|
$this->assertEquals($expected, $result);
|
|
$this->assertEquals($expected, $result);
|
|
|
|
|
|
|
|
$expected = '<a href="http://example.org">hell..</a>';
|
|
$expected = '<a href="http://example.org">hell..</a>';
|
|
|
- $result = Text::truncate($text, 6, array(
|
|
|
|
|
|
|
+ $result = Text::truncate($text, 6, [
|
|
|
'ellipsis' => '..',
|
|
'ellipsis' => '..',
|
|
|
'exact' => false,
|
|
'exact' => false,
|
|
|
'html' => true
|
|
'html' => true
|
|
|
- ));
|
|
|
|
|
|
|
+ ]);
|
|
|
$this->assertEquals($expected, $result);
|
|
$this->assertEquals($expected, $result);
|
|
|
}
|
|
}
|
|
|
|
|
|