You are here

public function SendTest::testWithFieldsObjectSettingCommmands in Googalytics - Google Analytics 8

Test the command array when values are provided in fieldsObject.

File

tests/src/Unit/AnalyticsCommand/SendTest.php, line 46

Class

SendTest
@coversDefaultClass \Drupal\ga\AnalyticsCommand\Send @group ga

Namespace

Drupal\Tests\ga\Unit\AnalyticsCommand

Code

public function testWithFieldsObjectSettingCommmands() {
  $command = new Send('pageview', [
    'field1' => 'value1',
  ]);
  $this
    ->assertEquals([
    [
      'send',
      'pageview',
      [
        'field1' => 'value1',
      ],
    ],
  ], $command
    ->getSettingCommands());
}