File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,24 @@ public function test_filtervars_simple()
3333 $ this ->assertEquals (date ('Y-m-d ' ), $ searchConfig ->applyFilterVars ('$DATE(now)$ ' ));
3434 }
3535
36+ public function test_filtervars_missing_pageid ()
37+ {
38+ global $ INFO , $ ID ;
39+
40+ $ ID = 'foo:bar:baz ' ;
41+ saveWikiText ($ ID , 'initial page ' , 'created for filter var test ' );
42+ $ INFO = [];
43+
44+ $ searchConfig = new SearchConfig ([]);
45+
46+ $ this ->assertEquals ($ ID , $ searchConfig ->applyFilterVars ('$ID$ ' ));
47+ $ this ->assertEquals ('foo:bar ' , $ searchConfig ->applyFilterVars ('$NS$ ' ));
48+ $ this ->assertEquals ('init ' , $ searchConfig ->applyFilterVars ('$PAGE$ ' ));
49+
50+ saveWikiText ($ ID , '' , 'cleanup ' );
51+ clearstatcache ();
52+ }
53+
3654 public function test_filtervars_nsorid ()
3755 {
3856 global $ INFO ;
You can’t perform that action at this time.
0 commit comments