From 89886b19e390e49cded7bf8d818f8945b473c2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Let=C3=A1=C4=8Dek?= Date: Sat, 22 Dec 2018 23:20:15 +0100 Subject: [PATCH] fix: We effectively don't need these tests They are tested as references to the TestClass --- tests/Server/ServerTestCase.php | 2 -- .../TextDocument/References/GlobalTest.php | 24 ------------------- 2 files changed, 26 deletions(-) diff --git a/tests/Server/ServerTestCase.php b/tests/Server/ServerTestCase.php index 8a37faf..50910e0 100644 --- a/tests/Server/ServerTestCase.php +++ b/tests/Server/ServerTestCase.php @@ -105,8 +105,6 @@ abstract class ServerTestCase extends TestCase 'TestNamespace\\TestClass::staticTestProperty' => new Location($symbolsUri, new Range(new Position(34, 18), new Position(34, 37))), 'TestNamespace\\TestClass::staticTestMethod()' => new Location($symbolsUri, new Range(new Position(46, 4), new Position(49, 5))), 'TestNamespace\\TestClass::testMethod()' => new Location($symbolsUri, new Range(new Position(57, 4), new Position(60, 5))), - 'TestNamespace\\ChildClass::staticTestProperty'=> new Location($symbolsUri, new Range(new Position(34, 18), new Position(34, 37))), - 'TestNamespace\\ChildClass::staticTestMethod()'=> new Location($symbolsUri, new Range(new Position(46, 4), new Position(49, 5))), 'TestNamespace\\test_function()' => new Location($symbolsUri, new Range(new Position(78, 0), new Position(81, 1))), 'TestNamespace\\whatever()' => new Location($referencesUri, new Range(new Position(21, 0), new Position(23, 1))), 'TestNamespace\\Example' => new Location($symbolsUri, new Range(new Position(101, 0), new Position(104, 1))), diff --git a/tests/Server/TextDocument/References/GlobalTest.php b/tests/Server/TextDocument/References/GlobalTest.php index 078fd27..d2550c8 100644 --- a/tests/Server/TextDocument/References/GlobalTest.php +++ b/tests/Server/TextDocument/References/GlobalTest.php @@ -198,28 +198,4 @@ class GlobalTest extends ServerTestCase )->wait(); $this->assertEquals([], $result); } - public function testReferencesForInheritedStaticMethods() - { - // public static function staticTestMethod() - // Get references for staticTestMethod - $definition = $this->getDefinitionLocation('ChildClass::staticTestMethod()'); - $result = $this->textDocument->references( - new ReferenceContext, - new TextDocumentIdentifier($definition->uri), - $definition->range->start - )->wait(); - $this->assertEquals($this->getReferenceLocations('TestClass::staticTestMethod()'), $result); - } - public function testReferencesForInheritedStaticProperties() - { - // public static $staticTestProperty; - // Get references for $staticTestProperty - $definition = $this->getDefinitionLocation('ChildClass::staticTestProperty'); - $result = $this->textDocument->references( - new ReferenceContext, - new TextDocumentIdentifier($definition->uri), - $definition->range->start - )->wait(); - $this->assertEquals($this->getReferenceLocations('TestClass::staticTestProperty'), $result); - } }