aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/formatter/BookmarkDefaultFormatterTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/formatter/BookmarkDefaultFormatterTest.php')
-rw-r--r--tests/formatter/BookmarkDefaultFormatterTest.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/formatter/BookmarkDefaultFormatterTest.php b/tests/formatter/BookmarkDefaultFormatterTest.php
index 4fcc5dd1..983960b6 100644
--- a/tests/formatter/BookmarkDefaultFormatterTest.php
+++ b/tests/formatter/BookmarkDefaultFormatterTest.php
@@ -211,13 +211,17 @@ class BookmarkDefaultFormatterTest extends TestCase
211 $this->formatter = new BookmarkDefaultFormatter($this->conf, false); 211 $this->formatter = new BookmarkDefaultFormatter($this->conf, false);
212 212
213 $bookmark = new Bookmark(); 213 $bookmark = new Bookmark();
214 $bookmark->setDescription('This guide extends and expands on PSR-1, the basic coding standard.'); 214 $bookmark->setDescription(
215 'This guide extends and expands on PSR-1, the basic coding standard.' . PHP_EOL .
216 'https://www.php-fig.org/psr/psr-1/'
217 );
215 $bookmark->addAdditionalContentEntry( 218 $bookmark->addAdditionalContentEntry(
216 'search_highlight', 219 'search_highlight',
217 ['description' => [ 220 ['description' => [
218 ['start' => 0, 'end' => 10], // "This guide" 221 ['start' => 0, 'end' => 10], // "This guide"
219 ['start' => 45, 'end' => 50], // basic 222 ['start' => 45, 'end' => 50], // basic
220 ['start' => 58, 'end' => 67], // standard. 223 ['start' => 58, 'end' => 67], // standard.
224 ['start' => 84, 'end' => 87], // fig
221 ]] 225 ]]
222 ); 226 );
223 227
@@ -226,7 +230,10 @@ class BookmarkDefaultFormatterTest extends TestCase
226 $this->assertSame( 230 $this->assertSame(
227 '<span class="search-highlight">This guide</span> extends and expands on PSR-1, the ' . 231 '<span class="search-highlight">This guide</span> extends and expands on PSR-1, the ' .
228 '<span class="search-highlight">basic</span> coding ' . 232 '<span class="search-highlight">basic</span> coding ' .
229 '<span class="search-highlight">standard.</span>', 233 '<span class="search-highlight">standard.</span><br />' . PHP_EOL .
234 '<a href="https://www.php-fig.org/psr/psr-1/">' .
235 'https://www.php-<span class="search-highlight">fig</span>.org/psr/psr-1/' .
236 '</a>',
230 $link['description'] 237 $link['description']
231 ); 238 );
232 } 239 }