You are here

public function DataLayerKernelTest::testDataLayerAddDoesNotOverwriteByDefault in dataLayer 8

Test DataLayer Add Does Not Overwrite By Default.

File

tests/src/Kernel/DataLayerKernelTest.php, line 127

Class

DataLayerKernelTest
Kernel test cases for datalayer module.

Namespace

Drupal\Tests\datalayer\Kernel

Code

public function testDataLayerAddDoesNotOverwriteByDefault() {
  $this
    ->setupEmptyDataLayer();
  datalayer_add([
    'foo' => 'bar',
  ]);
  $this
    ->assertEqual([
    'foo' => 'bar',
  ], datalayer_add([
    'foo' => 'baz',
  ]));
}