diff --git a/src/ORM/FieldType/DBText.php b/src/ORM/FieldType/DBText.php index 4e9448650..1e6066727 100644 --- a/src/ORM/FieldType/DBText.php +++ b/src/ORM/FieldType/DBText.php @@ -175,7 +175,7 @@ class DBText extends DBString * * @param int $characters Number of characters in the summary * @param string $keywords Supplied string ("keywords"). Will fall back to 'Search' querystring arg. - * @param bool $highlight Add a highlight element around search query? + * @param bool $highlight Add a highlight element around search query? * @param string $prefix Prefix text * @param string $suffix Suffix text * @return string HTML string with context @@ -222,7 +222,7 @@ class DBText extends DBString // Maintain case of original string $summary = preg_replace( '/' . preg_quote($stringPiece, '/') . '/i', - '$0', + '$0', $summary ); } diff --git a/tests/php/ORM/DBHTMLTextTest.php b/tests/php/ORM/DBHTMLTextTest.php index 46f0e0b0f..e028b0de4 100644 --- a/tests/php/ORM/DBHTMLTextTest.php +++ b/tests/php/ORM/DBHTMLTextTest.php @@ -295,21 +295,21 @@ class DBHTMLTextTest extends SapphireTest 'This is some text. It is a test', 20, 'test', - '... text. It is a test' + '... text. It is a test' ], [ // Retains case of original string 'This is some test text. Test test what if you have multiple keywords.', 50, 'some test', - 'This is some test text.' - . ' Test test what if you have...' + 'This is some test text.' + . ' Test test what if you have...' ], [ 'Here is some text & HTML included', 20, 'html', - '... text & HTML inc...' + '... text & HTML inc...' ], [ 'A dog ate a cat while looking at a Foobar', @@ -323,16 +323,16 @@ class DBHTMLTextTest extends SapphireTest 100, 'ate', // it should highlight 3 letters or more. - 'A dog ate a cat while looking at a Foobar', + 'A dog ate a cat while looking at a Foobar', ], // HTML Content is plain-textified, and incorrect tags removed [ - '

A dog ate a cat while looking at a Foobar

', + '

A dog ate a cat while looking at a Foobar

', 100, 'ate', // it should highlight 3 letters or more. - 'A dog ate a cat while looking at a Foobar', + 'A dog ate a cat while looking at a Foobar', ] ]; } @@ -586,7 +586,7 @@ class DBHTMLTextTest extends SapphireTest $field->FirstParagraph() ); $this->assertEquals( - 'Replaced short code with this. home', + 'Replaced short code with this. home', $field->ContextSummary(500, 'short code') ); diff --git a/tests/php/ORM/DBTextTest.php b/tests/php/ORM/DBTextTest.php index d3fbc3d4a..e5985cc33 100644 --- a/tests/php/ORM/DBTextTest.php +++ b/tests/php/ORM/DBTextTest.php @@ -214,21 +214,21 @@ class DBTextTest extends SapphireTest 'This is some text. It is a test', 20, 'test', - '... text. It is a test' + '... text. It is a test' ], [ // Retains case of original string 'This is some test text. Test test what if you have multiple keywords.', 50, 'some test', - 'This is some test text.' - . ' Test test what if you have...' + 'This is some test text.' + . ' Test test what if you have...' ], [ 'Here is some text & HTML included', 20, 'html', - '... text & HTML inc...' + '... text & HTML inc...' ], [ 'A dog ate a cat while looking at a Foobar', @@ -242,7 +242,7 @@ class DBTextTest extends SapphireTest 100, 'ate', // it should highlight 3 letters or more. - 'A dog ate a cat while looking at a Foobar', + 'A dog ate a cat while looking at a Foobar', ] ]; }