You are here

public function LabelTest::testAddingALabel in Block ARIA Landmark Roles 8

Test adding an ARIA label to a block.

Throws

\Behat\Mink\Exception\ExpectationException

File

tests/src/Functional/LabelTest.php, line 30

Class

LabelTest
Test adding ARIA labels.

Namespace

Drupal\Tests\block_aria_landmark_roles\Functional

Code

public function testAddingALabel() {
  $output = 'id="block-mainpagecontent" aria-label="foo"';
  $this
    ->assertSession()
    ->responseNotContains($output);
  $this
    ->drupalLogin($this
    ->createUser([
    'administer blocks',
  ]));
  $this
    ->drupalPostForm('admin/structure/block/add/system_main_block/classy', [
    'region' => 'content',
    'third_party_settings[block_aria_landmark_roles][label]' => 'foo',
  ], $this
    ->t('Save block'));
  $this
    ->assertSession()
    ->responseContains($output);
}