Session data in phpunittest

You misunderstand how $this->session() works.

It sets the HTTP Sessions for the next Integration Test call (like $this->get() or $this->post()) but does NOT directly write to the $_SESSION superglobal.