From 5125fa748eb213bc956e06f86ffb2ba27e9ffc76 Mon Sep 17 00:00:00 2001 From: Felix Becker Date: Sat, 19 Nov 2016 14:02:43 +0100 Subject: [PATCH] Move completion fixtures into directory --- .../property.php} | 0 tests/Server/TextDocument/CompletionTest.php | 18 +++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) rename fixtures/{completion.php => completion/property.php} (100%) diff --git a/fixtures/completion.php b/fixtures/completion/property.php similarity index 100% rename from fixtures/completion.php rename to fixtures/completion/property.php diff --git a/tests/Server/TextDocument/CompletionTest.php b/tests/Server/TextDocument/CompletionTest.php index 5aee8f2..800d88c 100644 --- a/tests/Server/TextDocument/CompletionTest.php +++ b/tests/Server/TextDocument/CompletionTest.php @@ -17,24 +17,24 @@ class CompletionTest extends TestCase private $textDocument; /** - * @var string + * @var Project */ - private $completionUri; + private $project; public function setUp() { $client = new LanguageClient(new MockProtocolStream, new MockProtocolStream); - $project = new Project($client, new ClientCapabilities); - $this->completionUri = pathToUri(__DIR__ . '/../../../fixtures/completion.php'); - $project->loadDocument(pathToUri(__DIR__ . '/../../../fixtures/global_symbols.php')); - $project->openDocument($this->completionUri, file_get_contents($this->completionUri)); - $this->textDocument = new Server\TextDocument($project, $client); + $this->project = new Project($client, new ClientCapabilities); + $this->project->loadDocument(pathToUri(__DIR__ . '/../../../fixtures/global_symbols.php'))->wait(); + $this->textDocument = new Server\TextDocument($this->project, $client); } - public function testCompletion() + public function testForPropertiesAndMethods() { + $completionUri = pathToUri(__DIR__ . '/../../../fixtures/completion/property.php'); + $this->project->openDocument($completionUri, file_get_contents($completionUri)); $items = $this->textDocument->completion( - new TextDocumentIdentifier($this->completionUri), + new TextDocumentIdentifier($completionUri), new Position(3, 7) )->wait(); $this->assertEquals([