systemConfig = $this->createMock(SystemConfig::class); $this->serverVersion = $this->createMock(ServerVersion::class); $this->serverVersion->method('getHumanVersion')->willReturn('33.13.17 Gold'); $this->serverVersion->method('getVersion')->willReturn([33, 13, 17]); $this->serverVersion->method('getBuild')->willReturn('dev'); return new InstanceInfo($this->systemConfig, $this->serverVersion); } public function testMetrics(): void { $this->assertCount(1, $this->metrics); $metric = array_pop($this->metrics); $this->assertSame([ 'full_version' => '33.13.17 Gold', 'major_version' => '33', 'build' => 'dev', 'installed' => '0', ], $metric->labels); } }