Decided to move visibility files apart
Other tests were failing because I modifed the global_symbols.php filepull/682/head
parent
8d4fe1ef9f
commit
9a75adfe07
|
@ -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
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* Deserunt enim minim sunt sint ea nisi. Deserunt excepteur tempor id nostrud
|
||||
* laboris commodo ad commodo velit mollit qui non officia id. Nulla duis veniam
|
||||
* veniam officia deserunt et non dolore mollit ea quis eiusmod sit non. Occaecat
|
||||
* consequat sunt culpa exercitation pariatur id reprehenderit nisi incididunt Lorem
|
||||
* sint. Officia culpa pariatur laborum nostrud cupidatat consequat mollit.
|
||||
*/
|
||||
class TestClass
|
||||
{
|
||||
/**
|
||||
* Anim labore veniam consectetur laboris minim quis aute aute esse nulla ad.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const TEST_CLASS_CONST = 123;
|
||||
|
||||
/**
|
||||
* Lorem excepteur officia sit anim velit veniam enim.
|
||||
*
|
||||
* @var TestClass[]
|
||||
*/
|
||||
public static $staticTestProperty;
|
||||
|
||||
/**
|
||||
* Reprehenderit magna velit mollit ipsum do.
|
||||
*
|
||||
* @var TestClass
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
public static function staticTestMethod()
|
||||
{
|
||||
echo self::TEST_CLASS_CONST;
|
||||
}
|
||||
|
||||
/**
|
||||
* Non culpa nostrud mollit esse sunt laboris in irure ullamco cupidatat amet.
|
||||
*
|
||||
* @param TestClass $testParameter Lorem sunt velit incididunt mollit
|
||||
* @return TestClass
|
||||
*/
|
||||
public function testMethod($testParameter): TestInterface
|
||||
{
|
||||
$this->testProperty = $testParameter;
|
||||
}
|
||||
|
||||
private function privateTestMethod()
|
||||
{
|
||||
return $this->privateProperty;
|
||||
}
|
||||
|
||||
protected function protectedTestMethod()
|
||||
{
|
||||
return $this->protectedProperty;
|
||||
}
|
||||
}
|
|
@ -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,
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue