File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
tests/Traits/Core/QueryStrings Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,28 @@ public function configure(): void
8484 $ mock ->boot ();
8585
8686 $ this ->assertSame ('table-search ' , $ mock ->getQueryStringAliasForSearch ());
87+ $ this ->assertFalse ($ mock ->hasQueryStringAliasForSearch ());
88+ }
89+
90+ public function test_can_change_default_search_query_string_alias (): void
91+ {
92+ $ mock = new class extends PetsTable
93+ {
94+ public ?array $ testAttributesArray ;
95+
96+ public function configure (): void
97+ {
98+ $ this ->setDataTableFingerprint ('test ' );
99+ }
100+ };
101+
102+ $ mock ->configure ();
103+ $ mock ->boot ();
104+
105+ $ this ->assertSame ('table-search ' , $ mock ->getQueryStringAliasForSearch ());
106+ $ mock ->setQueryStringAliasForSearch ('pet-search ' );
107+ $ this ->assertSame ('pet-search ' , $ mock ->getQueryStringAliasForSearch ());
87108 $ this ->assertTrue ($ mock ->hasQueryStringAliasForSearch ());
88109 }
110+
89111}
You can’t perform that action at this time.
0 commit comments