You are here

protected function PageManagerAdminTest::doTestEditBlock in Page Manager 8

Tests editing a block.

1 call to PageManagerAdminTest::doTestEditBlock()
PageManagerAdminTest::testAdmin in page_manager_ui/src/Tests/PageManagerAdminTest.php
Tests the Page Manager admin UI.

File

page_manager_ui/src/Tests/PageManagerAdminTest.php, line 374
Contains \Drupal\page_manager_ui\Tests\PageManagerAdminTest.

Class

PageManagerAdminTest
Tests the admin UI for page entities.

Namespace

Drupal\page_manager_ui\Tests

Code

protected function doTestEditBlock() {
  $this
    ->drupalGet('admin/structure/page_manager/manage/foo/page_variant__foo-block_display-0__general');
  $edit = [
    'variant_settings[page_title]' => 'Updated block label',
    'page_variant_label' => 'Updated block label',
  ];
  $this
    ->drupalPostForm(NULL, $edit, 'Update and save');

  // Test that the block is displayed.
  $this
    ->drupalGet('admin/foo');
  $this
    ->assertResponse(200);

  // Check the block label.
  $this
    ->assertRaw($edit['variant_settings[page_title]']);
}