getDocument('whatever'); $phpDocument->updateContent('hello world'); $textDocumentItem = new TextDocumentItem(); $textDocumentItem->uri = 'whatever'; $textDocumentItem->languageId = 'php'; $textDocumentItem->version = 1; $textDocumentItem->text = 'hello world'; $textDocument->didOpen($textDocumentItem); $textDocument->didClose(new TextDocumentIdentifier($textDocumentItem->uri)); $this->expectException(Exception::class); $phpDocument->getContent(); } }