public function RoleTest::testAddingARole in Block ARIA Landmark Roles 8
Test than an ARIA role can be added to a block.
Throws
\Behat\Mink\Exception\ExpectationException
File
- tests/
src/ Functional/ RoleTest.php, line 30
Class
- RoleTest
- Test adding ARIA roles.
Namespace
Drupal\Tests\block_aria_landmark_roles\FunctionalCode
public function testAddingARole() {
$output = 'div id="block-mainpagecontent" role="banner"';
$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][role]' => 'banner',
], $this
->t('Save block'));
$this
->assertSession()
->responseContains($output);
}