Skip to content

Conversation

@datamweb
Copy link
Contributor

@datamweb datamweb commented Dec 28, 2025

Description
This pull request introduces a dedicated “Session Testing” section that explains why session-specific testing utilities exist, how the ArrayHandler behaves in the testing environment, and how session state should be asserted correctly depending on the testing approach (unit vs feature/HTTP tests).

The changes also clarify the scope and lifecycle of session assertions, distinguishing between PHPUnit-based assertions for direct session usage and TestResponse session helpers that operate during the HTTP request/response lifecycle.

Finally, this PR improves cross-referencing between existing testing documentation to reduce confusion, avoid incorrect usage patterns, and make session testing behavior more predictable and easier to understand for developers.

See #2014

Screenshot 2025-12-28 112804

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn michalsn added the documentation Pull requests for documentation only label Dec 28, 2025
Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a valuable addition, as it effectively summarizes all the relevant aspects of session testing.

use Config\Session;

// Load session config
$config = new \config(Session::class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did it come from?

Copy link
Contributor Author

@datamweb datamweb Dec 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is not mine. It was applied automatically by a linter or Rector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Pull requests for documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants