You are here

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

Test the command array when values are provided in fieldsObject.

File

tests/src/Unit/AnalyticsCommand/GenericTest.php, line 35

Class

GenericTest
@coversDefaultClass \Drupal\ga\AnalyticsCommand\Generic @group ga

Namespace

Drupal\Tests\ga\Unit\AnalyticsCommand

Code

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