You are here

protected function RefreshPageElementsHelperTest::placeStatusMessagesBlock in Commerce Ajax Add to Cart 8

Places status messages block.

3 calls to RefreshPageElementsHelperTest::placeStatusMessagesBlock()
RefreshPageElementsHelperTest::testAjaxResponseStatusMessagesBlock in tests/src/Kernel/RefreshPageElementsHelperTest.php
Tests ajax response when status messages block is placed.
RefreshPageElementsHelperTest::testAjaxResponseUpdatePageElements in tests/src/Kernel/RefreshPageElementsHelperTest.php
Tests updatePageElements().
RefreshPageElementsHelperTest::testStatusMessageBlockId in tests/src/Kernel/RefreshPageElementsHelperTest.php
Tests getStatusMessagesBlockId().

File

tests/src/Kernel/RefreshPageElementsHelperTest.php, line 136

Class

RefreshPageElementsHelperTest
Tests RefreshPageElementsHelper methods.

Namespace

Drupal\Tests\dc_ajax_add_cart\Kernel

Code

protected function placeStatusMessagesBlock() {
  $entity = $this->controller
    ->create([
    'id' => $this->statusMessagesBlockId,
    'theme' => $this->activeTheme
      ->getName(),
    'region' => 'content',
    'plugin' => 'system_messages_block',
  ]);
  $entity
    ->save();
}