You are here

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

Test the command array when values are provided in fieldsObject.

File

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

Class

RequirePluginTest
@coversDefaultClass \Drupal\ga\AnalyticsCommand\RequirePlugin @group ga

Namespace

Drupal\Tests\ga\Unit\AnalyticsCommand

Code

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