You are here

public function HooksTest::testAcquiaExtensionInstall in Lightning Core 8.3

Same name and namespace in other branches
  1. 8.4 modules/acquia_telemetry/tests/src/Kernel/HooksTest.php \Drupal\Tests\acquia_telemetry\Kernel\HooksTest::testAcquiaExtensionInstall()

File

modules/acquia_telemetry/tests/src/Kernel/HooksTest.php, line 36

Class

HooksTest
@group lightning @group lightning_core @group acquia_telemetry

Namespace

Drupal\Tests\acquia_telemetry\Kernel

Code

public function testAcquiaExtensionInstall() {
  $modules = [
    'lightning_search',
  ];
  $this->telemetry
    ->getAcquiaExtensionNames()
    ->willReturn($modules)
    ->shouldBeCalled();
  $this->telemetry
    ->sendTelemetry('Acquia extensions installed', [
    'installed_extensions' => $modules,
  ])
    ->shouldBeCalled();
  acquia_telemetry_modules_installed($modules);
  $this->telemetry
    ->sendTelemetry('Acquia extensions uninstalled', [
    'uninstalled_extensions' => $modules,
  ])
    ->shouldBeCalled();
  acquia_telemetry_modules_uninstalled($modules);
}