Skip to content

Commit

Permalink
DEBUG dump app sticky
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Oct 6, 2021
1 parent 5c9d10e commit 0e9bb07
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/DemosTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ protected function getClient(): Client
$app->run();
}

if (\Closure::bind(fn () => $app->sticky_get_arguments, null, App::class)() !== ['__atk_json' => false, '__atk_tab' => false]) {
throw new \Atk4\Ui\Exception('Global GET sticky must never be set by any component');
// assert no test sets app/global GET sticky
$appSticky = \Closure::bind(fn () => $app->sticky_get_arguments, null, App::class)();
if ($appSticky !== ['__atk_json' => false, '__atk_tab' => false]) {
throw new \Atk4\Ui\Exception('Global GET sticky must never be set by any component' . print_r($appSticky, true));
}
} catch (\Throwable $e) {
// session_start() or ini_set() functions can be used only with native HTTP tests
Expand Down

0 comments on commit 0e9bb07

Please sign in to comment.