diff --git a/tests/Server/TextDocument/DidCloseTest.php b/tests/Server/TextDocument/DidCloseTest.php new file mode 100644 index 0000000..f473ace --- /dev/null +++ b/tests/Server/TextDocument/DidCloseTest.php @@ -0,0 +1,34 @@ +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(); + } +}