You are here

public function MetricTest::testStringIndexIntStringValue in Googalytics - Google Analytics 8

Test a valid index and value of type string.

Integer value should be cast.

File

tests/src/Unit/AnalyticsCommand/MetricTest.php, line 28

Class

MetricTest
@coversDefaultClass \Drupal\ga\AnalyticsCommand\Metric @group ga

Namespace

Drupal\Tests\ga\Unit\AnalyticsCommand

Code

public function testStringIndexIntStringValue() {
  $command = new Metric('42', '123');
  $this
    ->assertEquals([
    [
      'set',
      'metric42',
      123,
    ],
  ], $command
    ->getSettingCommands());
}