From d1f7e6959fdc254b3ed4dfc8b0b7f33db4887198 Mon Sep 17 00:00:00 2001 From: Florian Thoma Date: Tue, 5 Sep 2017 09:42:08 +1000 Subject: [PATCH] update tests and doc --- src/ORM/FieldType/DBText.php | 2 +- tests/php/ORM/DBHTMLTextTest.php | 16 ++++++++-------- tests/php/ORM/DBTextTest.php | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/ORM/FieldType/DBText.php b/src/ORM/FieldType/DBText.php index 66dadb620..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 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', ] ]; }