'0.1.2', 'appB' => '1.2.3 beta 4', ]; protected function getExporter():IMetricFamily { $this->appManager = $this->createMock(IAppManager::class); $this->appManager->method('getAppInstalledVersions') ->with(true) ->willReturn($this->appList); return new AppsInfo($this->appManager); } public function testMetrics(): void { $this->assertCount(1, $this->metrics); $metric = array_pop($this->metrics); $this->assertSame($this->appList, $metric->labels); } }