<?php
-namespace Search;
+namespace Tests\Search;
use Tests\TestCase;
$this->assertNull($scoreByTerm->get($term), "Failed asserting that \"$term\" is not indexed");
}
}
+
+ public function test_non_breaking_spaces_handled_as_spaces()
+ {
+ $page = $this->entities->newPage(['html' => '<p>a tigerbadger is a dangerous animal</p>']);
+
+ $scoreByTerm = $page->searchTerms()->pluck('score', 'term');
+ $this->assertNotNull($scoreByTerm->get('tigerbadger'));
+ $this->assertNotNull($scoreByTerm->get('dangerous'));
+ $this->assertNotNull($scoreByTerm->get('animal'));
+ }
}