Ignore some failures in tests
parent
602da52d22
commit
fe59b1d28b
|
@ -59,6 +59,7 @@ abstract class ServerTestCase extends TestCase
|
|||
$this->project->loadDocument($globalReferencesUri);
|
||||
$this->project->loadDocument($useUri);
|
||||
|
||||
// @codingStandardsIgnoreStart
|
||||
$this->definitionLocations = [
|
||||
|
||||
// Global
|
||||
|
@ -166,6 +167,7 @@ abstract class ServerTestCase extends TestCase
|
|||
0 => new Location($globalReferencesUri, new Range(new Position(10, 0), new Position(10, 13)))
|
||||
]
|
||||
];
|
||||
// @codingStandardsIgnoreEnd
|
||||
}
|
||||
|
||||
protected function getDefinitionLocation(string $fqn): Location
|
||||
|
|
|
@ -16,6 +16,7 @@ class DocumentSymbolTest extends ServerTestCase
|
|||
// Request symbols
|
||||
$uri = pathToUri(realpath(__DIR__ . '/../../../fixtures/symbols.php'));
|
||||
$result = $this->textDocument->documentSymbol(new TextDocumentIdentifier($uri));
|
||||
// @codingStandardsIgnoreStart
|
||||
$this->assertEquals([
|
||||
new SymbolInformation('TEST_CONST', SymbolKind::CONSTANT, $this->getDefinitionLocation('TestNamespace\\TEST_CONST'), 'TestNamespace'),
|
||||
new SymbolInformation('TestClass', SymbolKind::CLASS_, $this->getDefinitionLocation('TestNamespace\\TestClass'), 'TestNamespace'),
|
||||
|
@ -28,5 +29,6 @@ class DocumentSymbolTest extends ServerTestCase
|
|||
new SymbolInformation('TestInterface', SymbolKind::INTERFACE, $this->getDefinitionLocation('TestNamespace\\TestInterface'), 'TestNamespace'),
|
||||
new SymbolInformation('test_function', SymbolKind::FUNCTION, $this->getDefinitionLocation('TestNamespace\\test_function()'), 'TestNamespace'),
|
||||
], $result);
|
||||
// @codingStandardsIgnoreEnd
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ class SymbolTest extends ServerTestCase
|
|||
{
|
||||
// Request symbols
|
||||
$result = $this->workspace->symbol('');
|
||||
// @codingStandardsIgnoreStart
|
||||
$this->assertEquals([
|
||||
// Namespaced
|
||||
new SymbolInformation('TEST_CONST', SymbolKind::CONSTANT, $this->getDefinitionLocation('TestNamespace\\TEST_CONST'), 'TestNamespace'),
|
||||
|
@ -42,17 +43,20 @@ class SymbolTest extends ServerTestCase
|
|||
new SymbolInformation('test_function', SymbolKind::FUNCTION, $this->getDefinitionLocation('test_function()'), ''),
|
||||
new SymbolInformation('whatever', SymbolKind::FUNCTION, $this->getDefinitionLocation('whatever()'), '')
|
||||
], $result);
|
||||
// @codingStandardsIgnoreEnd
|
||||
}
|
||||
|
||||
public function testQueryFiltersResults()
|
||||
{
|
||||
// Request symbols
|
||||
$result = $this->workspace->symbol('testmethod');
|
||||
// @codingStandardsIgnoreStart
|
||||
$this->assertEquals([
|
||||
new SymbolInformation('staticTestMethod', SymbolKind::METHOD, $this->getDefinitionLocation('TestNamespace\\TestClass::staticTestMethod()'), 'TestNamespace\\TestClass'),
|
||||
new SymbolInformation('testMethod', SymbolKind::METHOD, $this->getDefinitionLocation('TestNamespace\\TestClass::testMethod()'), 'TestNamespace\\TestClass'),
|
||||
new SymbolInformation('staticTestMethod', SymbolKind::METHOD, $this->getDefinitionLocation('TestClass::staticTestMethod()'), 'TestClass'),
|
||||
new SymbolInformation('testMethod', SymbolKind::METHOD, $this->getDefinitionLocation('TestClass::testMethod()'), 'TestClass')
|
||||
], $result);
|
||||
// @codingStandardsIgnoreEnd
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue