diff --git a/fixtures/global_symbols.php b/fixtures/global_symbols.php index 7f81df7..bb69d00 100644 --- a/fixtures/global_symbols.php +++ b/fixtures/global_symbols.php @@ -41,20 +41,6 @@ class TestClass implements TestInterface */ public $testProperty; - /** - * Reprehenderit magna velit mollit ipsum do. - * - * @var TestClass - */ - private $privateProperty; - - /** - * Reprehenderit magna velit mollit ipsum do. - * - * @var TestClass - */ - protected $protectedProperty; - /** * Do magna consequat veniam minim proident eiusmod incididunt aute proident. */ @@ -73,16 +59,6 @@ class TestClass implements TestInterface { $this->testProperty = $testParameter; } - - private function privateTestMethod() - { - return $this->privateProperty; - } - - protected function protectedTestMethod() - { - return $this->protectedProperty; - } } trait TestTrait diff --git a/fixtures/visibility_class.php b/fixtures/visibility_class.php new file mode 100644 index 0000000..ece3462 --- /dev/null +++ b/fixtures/visibility_class.php @@ -0,0 +1,76 @@ +testProperty = $testParameter; + } + + private function privateTestMethod() + { + return $this->privateProperty; + } + + protected function protectedTestMethod() + { + return $this->protectedProperty; + } +} \ No newline at end of file diff --git a/tests/Server/TextDocument/CompletionTest.php b/tests/Server/TextDocument/CompletionTest.php index d845429..c64c8e6 100644 --- a/tests/Server/TextDocument/CompletionTest.php +++ b/tests/Server/TextDocument/CompletionTest.php @@ -827,23 +827,12 @@ class CompletionTest extends TestCase '\TestClass', // Type of the property 'Reprehenderit magna velit mollit ipsum do.' ), - new CompletionItem( - 'protectedProperty', - CompletionItemKind::PROPERTY, - '\TestClass', // Type of the property - 'Reprehenderit magna velit mollit ipsum do.' - ), new CompletionItem( 'testMethod', CompletionItemKind::METHOD, '\TestClass', // Return type of the method 'Non culpa nostrud mollit esse sunt laboris in irure ullamco cupidatat amet.' ), - new CompletionItem( - 'protectedTestMethod', - CompletionItemKind::METHOD, - 'mixed' // Return type of the method - ), new CompletionItem( 'foo', CompletionItemKind::PROPERTY, diff --git a/tests/Server/TextDocument/CompletionWithVisibilityTest.php b/tests/Server/TextDocument/CompletionWithVisibilityTest.php index 84ff476..e595d2a 100644 --- a/tests/Server/TextDocument/CompletionWithVisibilityTest.php +++ b/tests/Server/TextDocument/CompletionWithVisibilityTest.php @@ -58,8 +58,7 @@ class CompletionWithVisibilityTest extends TestCase $definitionResolver = new DefinitionResolver($projectIndex); $contentRetriever = new FileSystemContentRetriever; $this->loader = new PhpDocumentLoader($contentRetriever, $projectIndex, $definitionResolver); - $this->loader->load(pathToUri($this->fixturesPath . '/global_symbols.php'))->wait(); - $this->loader->load(pathToUri($this->fixturesPath . '/symbols.php'))->wait(); + $this->loader->load(pathToUri($this->fixturesPath . '/visibility_class.php'))->wait(); $this->textDocument = new TextDocument($this->loader, $definitionResolver, $client, $projectIndex); } @@ -122,7 +121,7 @@ class CompletionWithVisibilityTest extends TestCase public function testVisibilityInsideClassMethod() { - $items = $this->getCompletion('/global_symbols.php', 73, 15); + $items = $this->getCompletion('/visibility_class.php', 64, 15); // can see all properties and methods $this->assertCompletionsListSubset(new CompletionList([ new CompletionItem(