File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
tests/Unit/Traits/Helpers Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -194,4 +194,24 @@ public function resetSearchConfiguration(): self
194194 $ this ->assertSame ('.live.throttle.599ms ' , $ temp ->getSearchOptions ());
195195
196196 }
197+
198+ public function test_can_get_search_term_with_trim (): void
199+ {
200+ $ this ->basicTable ->setTrimSearchStringEnabled ();
201+ $ this ->basicTable ->setSearch ('Anthony ' );
202+ $ this ->assertSame ('Anthony ' , $ this ->basicTable ->getSearch ());
203+ $ this ->basicTable ->setSearch ('Bob ' );
204+ $ this ->assertSame ('Bob ' , $ this ->basicTable ->getSearch ());
205+ $ this ->basicTable ->setSearch (' Bill ' );
206+ $ this ->assertSame ('Bill ' , $ this ->basicTable ->getSearch ());
207+ }
208+
209+ public function test_can_get_search_term_without_trim (): void
210+ {
211+ $ this ->basicTable ->setTrimSearchStringDisabled ();
212+ $ this ->basicTable ->setSearch ('Ben ' );
213+ $ this ->assertSame ('Ben ' , $ this ->basicTable ->getSearch ());
214+ $ this ->basicTable ->setSearch (' Baz ' );
215+ $ this ->assertSame (' Baz ' , $ this ->basicTable ->getSearch ());
216+ }
197217}
You can’t perform that action at this time.
0 commit comments