php-sdk/tests/Unit/Server/Session
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Christopher Hertel a987a3a248
[Server] Throw the SDK's own RuntimeException from FileSessionStore (#404)
The constructor guarded its unwritable-directory case with the global
`\RuntimeException`, the only throw in `src/` still outside
`Mcp\Exception\ExceptionInterface`. A consumer wrapping server setup in a
`catch (ExceptionInterface)` missed it and got an unhandled SPL exception on
a misconfigured session directory instead.

`Mcp\Exception\RuntimeException` extends `\RuntimeException`, so this is
additive: existing `catch (\RuntimeException)` blocks keep working.

The constructor had no test coverage at all, so this adds one for the throw
plus the directory-creation and write/read paths around it.
2026-08-14 21:29:26 +02:00
..
FileSessionStoreTest.php [Server] Throw the SDK's own RuntimeException from FileSessionStore (#404) 2026-08-14 21:29:26 +02:00
SessionManagerTest.php Add configurable session garbage collection (gcProbability/gcDivisor) (#258) 2026-05-15 08:14:38 +02:00
SessionTest.php style: apply php-cs-fixer and PHPStan fixes (#289) 2026-04-20 20:49:15 +02:00