nextcloud/tests/lib/OpenMetrics/Exporters/ActiveUsersTest.php
Ferdinand Thiessen e5b1799079
chore: add missing Override attribute to test files
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-28 21:29:28 +02:00

33 lines
755 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\OpenMetrics\Exporters;
use OC\OpenMetrics\Exporters\ActiveUsers;
use OCP\IDBConnection;
use OCP\OpenMetrics\IMetricFamily;
use OCP\Server;
use PHPUnit\Framework\Attributes\Group;
#[Group('DB')]
class ActiveUsersTest extends ExporterTestCase {
#[\Override]
protected function getExporter():IMetricFamily {
return new ActiveUsers(Server::get(IDBConnection::class));
}
public function testMetricsLabel(): void {
$this->assertLabelsAre([
['time' => 'Last 5 minutes'],
['time' => 'Last 15 minutes'],
['time' => 'Last hour'],
['time' => 'Last day'],
]);
}
}