File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
tests/unit/Http/Middleware Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 77use PhpMyAdmin \Dbal \DatabaseInterface ;
88use PhpMyAdmin \Http \Factory \ServerRequestFactory ;
99use PhpMyAdmin \Http \Middleware \TokenRequestParamChecking ;
10+ use PhpMyAdmin \ResponseRenderer ;
1011use PhpMyAdmin \Tests \Stubs \DbiDummy ;
1112use PHPUnit \Framework \Attributes \CoversClass ;
1213use PHPUnit \Framework \TestCase ;
@@ -51,6 +52,9 @@ public function testCheckTokenRequestParamWithTokenMismatch(): void
5152 $ dbi = new DatabaseInterface (new DbiDummy ());
5253 DatabaseInterface::$ instance = $ dbi ;
5354
55+ $ responseRenderer = ResponseRenderer::getInstance ();
56+ $ responseRenderer ->setAjax (true );
57+
5458 $ _SESSION [' PMA_token ' ] = 'mismatch ' ;
5559 $ request = ServerRequestFactory::create ()->createServerRequest ('POST ' , 'http://example.com/ ' )
5660 ->withParsedBody (['token ' => 'token ' , 'ajax_request ' => 'true ' ]);
You can’t perform that action at this time.
0 commit comments