File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,22 @@ public function test_tag_names_and_values_are_indexed_for_search()
7575 $ this ->assertEquals (3 , $ scoreByTerm ->get ('SuperImportant ' ));
7676 }
7777
78+ public function test_terms_containing_guillemets_handled ()
79+ {
80+ $ page = $ this ->entities ->newPage (['html ' => '<p>«Hello there» and « there »</p> ' ]);
81+
82+ $ scoreByTerm = $ page ->searchTerms ()->pluck ('score ' , 'term ' );
83+ $ expected = ['Hello ' , 'there ' , 'and ' ];
84+ foreach ($ expected as $ term ) {
85+ $ this ->assertNotNull ($ scoreByTerm ->get ($ term ), "Failed asserting that \"$ term \" is indexed " );
86+ }
87+
88+ $ nonExpected = ['« ' , '» ' ];
89+ foreach ($ nonExpected as $ term ) {
90+ $ this ->assertNull ($ scoreByTerm ->get ($ term ), "Failed asserting that \"$ term \" is not indexed " );
91+ }
92+ }
93+
7894 public function test_terms_containing_punctuation_within_retain_original_form_and_split_form_in_index ()
7995 {
8096 $ page = $ this ->entities ->newPage (['html ' => '<p>super.duper awesome-beans big- barry cheese.</p><p>biscuits</p><p>a-bs</p> ' ]);
You can’t perform that action at this time.
0 commit comments