Skip to content

Commit 714abb5

Browse files
committed
Update
1 parent c7a5685 commit 714abb5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

bin/serve.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ function (MessageTransmitter $transmitter, InitializeParams $params) use ($logge
106106
$clientApi = new ClientApi(new JsonRpcClient($transmitter, $responseWatcher));
107107

108108
$diagnosticsService = new DiagnosticsService(
109-
new DiagnosticsEngine($clientApi, new AggregateDiagnosticsProvider(
109+
new DiagnosticsEngine($clientApi, [new AggregateDiagnosticsProvider(
110110
$logger,
111111
new SayHelloDiagnosticsProvider()
112-
))
112+
)])
113113
);
114114

115115
$serviceProviders = new ServiceProviders($diagnosticsService);

tests/Unit/Core/Diagnostics/DiagnosticsEngineTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,15 @@ public function testDeduplicatesSuccessiveChangesToSameFile(): Generator
7676
$token = new CancellationTokenSource();
7777
$promise = $engine->run($token->getToken());
7878

79+
$engine->enqueue(ProtocolFactory::textDocumentItem('file:///foobar', 'foobar'));
7980
$engine->enqueue(ProtocolFactory::textDocumentItem('file:///foobar', 'foobar'));
8081
$engine->enqueue(ProtocolFactory::textDocumentItem('file:///foobar', 'foobar'));
8182

82-
yield new Delayed(10);
83+
yield new Delayed(1);
8384

8485
$token->cancel();
8586

87+
// clear three times
8688
self::assertEquals(3, $tester->transmitter()->count());
8789
}
8890

0 commit comments

Comments
 (0)