You are here

public function DataLayerKernelTest::testDataLayerAddWillOverwriteWithFlag in dataLayer 8

Test DataLayer Add Will Overwrite With Flag.

File

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

Class

DataLayerKernelTest
Kernel test cases for datalayer module.

Namespace

Drupal\Tests\datalayer\Kernel

Code

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