File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,36 @@ public function test_filtervars_missing_pageid()
5151 clearstatcache ();
5252 }
5353
54+ public function test_filtervars_ignore_dynamic_filters ()
55+ {
56+ global $ INPUT ;
57+
58+ $ INPUT ->set (meta \SearchConfigParameters::$ PARAM_SORT , '^alias2.athird ' );
59+ $ INPUT ->set (meta \SearchConfigParameters::$ PARAM_OFFSET , 25 );
60+ $ _REQUEST [meta \SearchConfigParameters::$ PARAM_FILTER ]['alias1.first*~ ' ] = 'test ' ;
61+ $ _REQUEST [meta \SearchConfigParameters::$ PARAM_FILTER ]['afirst= ' ] = 'test2 ' ;
62+
63+ $ config = [
64+ 'schemas ' => [
65+ ['schema1 ' , 'alias1 ' ]
66+ ],
67+ 'cols ' => ['first ' ],
68+ 'limit ' => 10
69+ ];
70+
71+ $ searchConfig = new SearchConfig ($ config , false );
72+
73+ $ this ->assertSame (0 , $ searchConfig ->getLimit ());
74+ $ this ->assertSame (0 , $ searchConfig ->getOffset ());
75+ $ this ->assertSame ([], $ searchConfig ->getSorts ());
76+ $ this ->assertEquals ([], $ searchConfig ->getDynamicParameters ()->getURLParameters ());
77+
78+ unset($ INPUT [meta \SearchConfigParameters::$ PARAM_SORT ]);
79+ unset($ INPUT [meta \SearchConfigParameters::$ PARAM_OFFSET ]);
80+ unset($ _REQUEST [meta \SearchConfigParameters::$ PARAM_FILTER ]);
81+ unset($ _REQUEST [meta \SearchConfigParameters::$ PARAM_FILTER ]);
82+ }
83+
5484 public function test_filtervars_nsorid ()
5585 {
5686 global $ INFO ;
You can’t perform that action at this time.
0 commit comments