Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
nticaric committed May 9, 2016
1 parent 64ff967 commit 588410a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/TNTSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use TeamTNT\TNTSearch\Stemmer\PorterStemmer;
use TeamTNT\TNTSearch\Support\Collection;
use TeamTNT\TNTSearch\Support\Expression;
use TeamTNT\TNTSearch\Support\Hihglighter;
use TeamTNT\TNTSearch\Support\Highlighter;

class TNTSearch
{
Expand Down Expand Up @@ -298,13 +298,13 @@ public function breakIntoTokens($text)

public function highlight($text, $needle, $tag = 'em', $options = [])
{
$hl = new Hihglighter;
$hl = new Highlighter;
return $hl->highlight($text, $needle, $tag, $options);
}

public function snippet($words, $fulltext, $rellength = 300, $prevcount = 50, $indicator = '...')
{
$hl = new Hihglighter;
$hl = new Highlighter;
return $hl->extractRelevant($words, $fulltext, $rellength, $prevcount, $indicator);
}
}
6 changes: 3 additions & 3 deletions tests/support/HighlighterTest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

use TeamTNT\TNTSearch\Support\Hihglighter;
use TeamTNT\TNTSearch\Support\Highlighter;

class HighlighterTest extends PHPUnit_Framework_TestCase
{
public function testHighlight()
{
$hl = new Hihglighter;
$hl = new Highlighter;
$text = "This is some text";
$output = $hl->highlight($text, "is text", 'em', ['wholeWord' => false]);
$this->assertEquals("Th<em>is</em> <em>is</em> some <em>text</em>", $output);
Expand All @@ -29,7 +29,7 @@ public function testHighlight()

public function testExtractRelevant()
{
$hl = new Hihglighter;
$hl = new Highlighter;
$words = "This is some text";
$fulltext = "bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla " .
"bla bla bla This is a sentence that contains the phrase This is some text and " .
Expand Down

0 comments on commit 588410a

Please sign in to comment.