enabledTopics); } #[Test] public function exceptionIsThrownIfAnyProvidedTopicIsInvalid(): void { $this->expectException(ValidationException::class); new RealTimeUpdatesOptions(['NEW_SHORT_URL_VISIT', 'invalid']); } #[Test] public function checkingIfTopicIsEnabledWorks(): void { $options = new RealTimeUpdatesOptions(['NEW_ORPHAN_VISIT', 'NEW_SHORT_URL']); self::assertTrue($options->isTopicEnabled(Topic::NEW_ORPHAN_VISIT)); self::assertTrue($options->isTopicEnabled(Topic::NEW_SHORT_URL)); self::assertFalse($options->isTopicEnabled(Topic::NEW_VISIT)); self::assertFalse($options->isTopicEnabled(Topic::NEW_SHORT_URL_VISIT)); } }