diff --git a/tests/LanguageServer/DiagnosticTest.php b/tests/LanguageServer/DiagnosticTest.php index b40ef38ace3..d8814ec3633 100644 --- a/tests/LanguageServer/DiagnosticTest.php +++ b/tests/LanguageServer/DiagnosticTest.php @@ -91,10 +91,21 @@ public function testSnippetSupportDisabled(): void ); $write->on('message', function (Message $message) use ($deferred, $server): void { - /** @psalm-suppress PossiblyNullPropertyFetch,UndefinedPropertyFetch,MixedPropertyFetch */ - if ($message->body->method === 'telemetry/event' && $message->body->params->message === 'initialized') { + /** @psalm-suppress NullPropertyFetch,PossiblyNullPropertyFetch,UndefinedPropertyFetch */ + if ($message->body->method === 'telemetry/event' && ($message->body->params->message ?? null) === 'initialized') { $this->assertFalse($server->clientCapabilities->textDocument->completion->completionItem->snippetSupport); $deferred->resolve(null); + return; + } + + /** @psalm-suppress NullPropertyFetch,PossiblyNullPropertyFetch */ + if ($message->body->method === '$/progress' + && ($message->body->params->value->kind ?? null) === 'end' + && ($message->body->params->value->message ?? null) === 'initialized' + ) { + $this->assertFalse($server->clientCapabilities->textDocument->completion->completionItem->snippetSupport); + $deferred->resolve(null); + return; } });