Session data in phpunittest

@webdeveloper
Tue, 03 Sep 2024 13:48:11 +0000

Thank you. When I debug I do not see the session variables. But I can see the Flash.

        $this->session(['Auth.User.user_id' => 5]);
        dd($_SESSION);

debug:

PHPUnit 9.6.19 by Sebastian Bergmann and contributors.

E..S^ array:1 [
  "Flash" => array:1 [
    "flash" => array:1 [
      0 => array:4 [
        "message" => "New course code ABCD saved."
        "key" => "flash"
        "element" => "flash/success"
        "params" => []
      ]
    ]
  ]
]