From 5b999ee11c2928c3525d40fe3bd7ea96830aa8a4 Mon Sep 17 00:00:00 2001 From: Piotr Rogowski Date: Fri, 24 Jul 2020 14:05:51 +0200 Subject: [PATCH] Update tests and docsUrl --- src/Service/Config.php | 2 +- src/Service/Telemetry.php | 2 +- tests/Functional/Command/SendTelemetryCommandTest.php | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Service/Config.php b/src/Service/Config.php index 576c8b6c..f041d854 100644 --- a/src/Service/Config.php +++ b/src/Service/Config.php @@ -57,7 +57,7 @@ public function userRegistrationEnabled(): bool public function telemetryEnabled(): bool { - return $this->get('telemetry') === self::TELEMETRY_ENABLED; + return $this->get(self::TELEMETRY) === self::TELEMETRY_ENABLED; } /** diff --git a/src/Service/Telemetry.php b/src/Service/Telemetry.php index 3c2d684f..4cbcc11d 100644 --- a/src/Service/Telemetry.php +++ b/src/Service/Telemetry.php @@ -38,7 +38,7 @@ public function __construct(string $instanceIdFile, TelemetryQuery $query, Endpo public function docsUrl(): string { - return 'https://repman.io/docs/telemetry'; + return 'https://repman.io/docs/standalone#telemetry'; } public function generateInstanceId(): void diff --git a/tests/Functional/Command/SendTelemetryCommandTest.php b/tests/Functional/Command/SendTelemetryCommandTest.php index e00fcb39..83ebe475 100644 --- a/tests/Functional/Command/SendTelemetryCommandTest.php +++ b/tests/Functional/Command/SendTelemetryCommandTest.php @@ -22,6 +22,7 @@ public function testSendTelemetryWithoutInstanceIdFile(): void ); self::assertEquals(0, $commandTester->execute([])); + self::assertFalse($this->container()->get(TelemetryEndpoint::class)->sent()); } public function testSendTelemetryWithTelemetryDisabled(): void @@ -34,6 +35,7 @@ public function testSendTelemetryWithTelemetryDisabled(): void ); self::assertEquals(0, $commandTester->execute([])); + self::assertFalse($this->container()->get(TelemetryEndpoint::class)->sent()); } public function testSendTelemetry(): void