diff --git a/tests/Unit/Client/Transport/HttpTransportTest.php b/tests/Unit/Client/Transport/HttpTransportTest.php index 100107d2..408980d7 100644 --- a/tests/Unit/Client/Transport/HttpTransportTest.php +++ b/tests/Unit/Client/Transport/HttpTransportTest.php @@ -43,8 +43,8 @@ public function testSseBufferIsBoundedByConfiguredCap(): void $this->invokeProcessSseStream($transport); - self::assertSame('', $this->readPrivate($transport, 'sseBuffer'), 'buffer must be cleared on abort'); - self::assertNull($this->readPrivate($transport, 'activeStream'), 'stream must be released on abort'); + $this->assertSame('', $this->readPrivate($transport, 'sseBuffer'), 'buffer must be cleared on abort'); + $this->assertNull($this->readPrivate($transport, 'activeStream'), 'stream must be released on abort'); } #[TestDox('aborting the SSE stream fails the in-flight request immediately instead of waiting for its timeout')] @@ -60,9 +60,9 @@ public function testAbortFailsPendingRequestFast(): void $this->invokeProcessSseStream($transport); $response = $state->consumeResponse(1); - self::assertInstanceOf(Error::class, $response); - self::assertSame(Error::INTERNAL_ERROR, $response->code); - self::assertSame(1, $response->id); + $this->assertInstanceOf(Error::class, $response); + $this->assertSame(Error::INTERNAL_ERROR, $response->code); + $this->assertSame(1, $response->id); } #[TestDox('well-formed delimited events are parsed and dispatched')] @@ -78,7 +78,7 @@ public function testWellFormedEventsStillParse(): void $this->invokeProcessSseStream($transport); - self::assertSame(['hello', 'world'], $messages); + $this->assertSame(['hello', 'world'], $messages); } #[TestDox('the buffer cap must be a positive number of bytes')] diff --git a/tests/Unit/Client/Transport/StdioTransportTest.php b/tests/Unit/Client/Transport/StdioTransportTest.php index ecc46b8f..fb314083 100644 --- a/tests/Unit/Client/Transport/StdioTransportTest.php +++ b/tests/Unit/Client/Transport/StdioTransportTest.php @@ -33,7 +33,7 @@ public function testInputBufferIsBounded(): void $this->invokeProcessInput($transport); - self::assertSame('', $this->readPrivate($transport, 'inputBuffer'), 'buffer must be cleared on abort'); + $this->assertSame('', $this->readPrivate($transport, 'inputBuffer'), 'buffer must be cleared on abort'); } #[TestDox('aborting the input fails the in-flight request immediately')] @@ -49,9 +49,9 @@ public function testAbortFailsPendingRequestFast(): void $this->invokeProcessInput($transport); $response = $state->consumeResponse(1); - self::assertInstanceOf(Error::class, $response); - self::assertSame(Error::INTERNAL_ERROR, $response->code); - self::assertSame(1, $response->id); + $this->assertInstanceOf(Error::class, $response); + $this->assertSame(Error::INTERNAL_ERROR, $response->code); + $this->assertSame(1, $response->id); } #[TestDox('newline-delimited frames within the cap are parsed and dispatched')] @@ -67,7 +67,7 @@ public function testWellFormedFramesStillParse(): void $this->invokeProcessInput($transport); - self::assertSame(['{"a":1}', '{"b":2}'], $messages); + $this->assertSame(['{"a":1}', '{"b":2}'], $messages); } #[TestDox('the buffer cap must be a positive number of bytes')] diff --git a/tests/Unit/Server/Transport/StdioTransportTest.php b/tests/Unit/Server/Transport/StdioTransportTest.php index 252454d8..dbfcec2f 100644 --- a/tests/Unit/Server/Transport/StdioTransportTest.php +++ b/tests/Unit/Server/Transport/StdioTransportTest.php @@ -26,7 +26,7 @@ public function testOverlongLineIsDiscarded(): void $this->pumpToEof($transport); - self::assertSame([], $messages, 'the over-length line must never be dispatched'); + $this->assertSame([], $messages, 'the over-length line must never be dispatched'); } #[TestDox('processing resumes with the next line after an over-length line is discarded')] @@ -37,7 +37,7 @@ public function testRecoversAfterOverlongLine(): void $this->pumpToEof($transport); - self::assertSame(['{"valid":1}'], $messages); + $this->assertSame(['{"valid":1}'], $messages); } #[TestDox('a normal line within the cap is dispatched')] @@ -48,7 +48,7 @@ public function testNormalLineIsDispatched(): void $this->pumpToEof($transport); - self::assertSame(['{"jsonrpc":"2.0","id":1}'], $messages); + $this->assertSame(['{"jsonrpc":"2.0","id":1}'], $messages); } #[TestDox('the line byte cap must be a positive number of bytes')]