longitude1; } public function getLongitude2(): Node|string { return $this->longitude2; } public function getLatitude1(): Node|string { return $this->latitude1; } public function getLatitude2(): Node|string { return $this->latitude2; } } class SphericalDistanceTest extends TestCase { protected function getMockFor(string $methodName): TestableSphericalDistance|MockObject { return $this ->getMockBuilder(TestableSphericalDistance::class) ->setMethodsExcept([$methodName, 'getLongitude1', 'getLongitude2', 'getLatitude1', 'getLatitude2']) ->getMock(); } // TODO: complete if possible (it's hard to test...) }