Closed BladeMF closed 3 years ago
Not sure why 7.3 CS fixer fails...
restarted the build, probably temporary failure. you should be able to use the LS server tester more than you have, but it's already much better by using RpcTestClient.
:boom: I will see if I can iterate on this for diagnostics and the tests.
A code action for the "Generate method" refactoring. Some points (also noted in the code):
provideDiagnostics
is fitted with "check for undefined method", it will be good to go;The test I intentionally made a unit test rather than an integration test, because:
CodeActionProvider
andDiagnosticsProvider
will prove the plumbing is working - I'd rather test eachCodeActionProvider
whether they provide the correct actions/diagnostics in the correct context and then test whether theCommand
is passing to and from the model and handling exceptions.The only problem with the above is the very difficult mocking of the
ClientApi
class. We can create aClientApiSpy
class that collects all calls topublic function request(string $method, array $params): Promise
andpublic function notification(string $method, array $params): void
methods or allows a callback to emulate responses.