You are here

public function CheckboxWithExcludeTest::testPoweredByBlockExcluded in Block Style Plugins 8.2

Same name and namespace in other branches
  1. 8 tests/src/Functional/CheckboxWithExcludeTest.php \Drupal\Tests\block_style_plugins\Functional\CheckboxWithExcludeTest::testPoweredByBlockExcluded()

Test a style is successfully excluded from a block.

Test that the Checkbox style does not appear on the "Powered by Drupal" block instance.

File

tests/src/Functional/CheckboxWithExcludeTest.php, line 64

Class

CheckboxWithExcludeTest
Test the CheckboxWithExclude plugin.

Namespace

Drupal\Tests\block_style_plugins\Functional

Code

public function testPoweredByBlockExcluded() {
  $assert = $this
    ->assertSession();

  // Go to the block instance configuration page.
  $this
    ->drupalGet('admin/structure/block/manage/poweredbytest');
  $assert
    ->pageTextContains('Block Styles');

  // Check that the style options are NOT available.
  $assert
    ->pageTextNotContains('Check this box');
  $assert
    ->fieldNotExists('third_party_settings[block_style_plugins][checkbox_with_exclude][checkbox_class]');
}