File tree Expand file tree Collapse file tree
tests/Unit/Server/Session Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212namespace Mcp \Server \Session ;
1313
14+ use Mcp \Exception \InvalidArgumentException ;
1415use Psr \Log \LoggerInterface ;
1516use Psr \Log \NullLogger ;
1617use Symfony \Component \Uid \Uuid ;
@@ -33,10 +34,10 @@ public function __construct(
3334 private readonly int $ gcDivisor = 100 ,
3435 ) {
3536 if ($ gcProbability < 0 ) {
36- throw new \ InvalidArgumentException ('gcProbability must be greater than or equal to 0. ' );
37+ throw new InvalidArgumentException ('gcProbability must be greater than or equal to 0. ' );
3738 }
3839 if ($ gcDivisor < 1 ) {
39- throw new \ InvalidArgumentException ('gcDivisor must be greater than or equal to 1. ' );
40+ throw new InvalidArgumentException ('gcDivisor must be greater than or equal to 1. ' );
4041 }
4142 }
4243
Original file line number Diff line number Diff line change 1111
1212namespace Mcp \Tests \Unit \Server \Session ;
1313
14+ use Mcp \Exception \InvalidArgumentException ;
1415use Mcp \Server \Session \InMemorySessionStore ;
1516use Mcp \Server \Session \SessionManager ;
1617use PHPUnit \Framework \TestCase ;
@@ -56,15 +57,15 @@ public function testGcAlwaysRunsWhenProbabilityExceedsDivisor(): void
5657
5758 public function testGcProbabilityMustBeNonNegative (): void
5859 {
59- $ this ->expectException (\ InvalidArgumentException::class);
60+ $ this ->expectException (InvalidArgumentException::class);
6061 $ this ->expectExceptionMessage ('gcProbability must be greater than or equal to 0. ' );
6162
6263 new SessionManager (new InMemorySessionStore (), gcProbability: -1 );
6364 }
6465
6566 public function testGcDivisorMustBePositive (): void
6667 {
67- $ this ->expectException (\ InvalidArgumentException::class);
68+ $ this ->expectException (InvalidArgumentException::class);
6869 $ this ->expectExceptionMessage ('gcDivisor must be greater than or equal to 1. ' );
6970
7071 new SessionManager (new InMemorySessionStore (), gcDivisor: 0 );
You can’t perform that action at this time.
0 commit comments