You are here

public function EventTest::testWithTrackerNameSettingCommands in Googalytics - Google Analytics 8

Test the command when a tracker name is provided.

File

tests/src/Unit/AnalyticsCommand/EventTest.php, line 131

Class

EventTest
@coversDefaultClass \Drupal\ga\AnalyticsCommand\Event @group ga

Namespace

Drupal\Tests\ga\Unit\AnalyticsCommand

Code

public function testWithTrackerNameSettingCommands() {
  $command = new Event('category', 'action', NULL, NULL, [], 'tracker');
  $this
    ->assertEquals([
    [
      'tracker.send',
      'event',
      'category',
      'action',
    ],
  ], $command
    ->getSettingCommands());
}