public function EventTest::testWithFieldsObjectSettingCommmands in Googalytics - Google Analytics 8
Test the command array when values are provided in fieldsObject.
File
- tests/
src/ Unit/ AnalyticsCommand/ EventTest.php, line 119
Class
- EventTest
- @coversDefaultClass \Drupal\ga\AnalyticsCommand\Event @group ga
Namespace
Drupal\Tests\ga\Unit\AnalyticsCommandCode
public function testWithFieldsObjectSettingCommmands() {
$command = new Event('category', 'action', NULL, NULL, [
'field1' => 'value1',
]);
$this
->assertEquals([
[
'send',
'event',
'category',
'action',
[
'field1' => 'value1',
],
],
], $command
->getSettingCommands());
}