Skip to content

Commit

Permalink
ACMS-1975: Passing arguments to fix test failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
apathak18 committed Oct 18, 2023
1 parent 28ba090 commit 8cada39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ private function sendEvent(array $event): void {
}

/**
* Creates and sends an event to Amplitude.
* Creates and sends an event to Amplitude, Also collects data into sumologic.
*
* @param string $event_type
* The event type. This accepts any string that is not reserved. Reserved
Expand All @@ -205,7 +205,8 @@ public function sendTelemetry(string $event_type, array $event_properties = []):
$this->sendEvent($event);
$this->state->set('acquia_cms_common.telemetry.data', json_encode($event_properties));
$this->state->set('acquia_cms_common.telemetry.timestamp', $this->time->getCurrentTime());
$this->logger->get($event_type)->info(json_encode($event, JSON_PRETTY_PRINT));
// Logging the database and collecting data into sumologic.
$this->logger->get($event_type)->info(print_r($event, TRUE));

return TRUE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ protected function setUp(): void {
$this->container->get("state"),
$this->container->getParameter("site.path"),
$this->container->get("datetime.time"),
$this->container->get("logger.factory"),
);
$path = explode('/', $this->container->getParameter('site.path'));
$this->siteUri = end($path);
Expand Down Expand Up @@ -210,6 +211,7 @@ public function testGetExtensionInfo() {
$this->container->get("state"),
$this->container->getParameter("site.path"),
$this->container->get("datetime.time"),
$this->container->get("logger.factory"),
);
$method = $this->getAcqauiaCmsTelemetryMethod("getExtensionInfo");
$actual_data = $method->invoke($telemetry);
Expand Down

0 comments on commit 8cada39

Please sign in to comment.