You are here

public function InstagramBlockPlaceBlockTest::testCoreThemeBlockList in Instagram Block 8.2

Same name and namespace in other branches
  1. 8.3 src/Tests/InstagramBlockPlaceBlockTest.php \Drupal\instagram_block\Tests\InstagramBlockPlaceBlockTest::testCoreThemeBlockList()

Test availability of block in the admin 'Place blocks' list.

File

src/Tests/InstagramBlockPlaceBlockTest.php, line 154

Class

InstagramBlockPlaceBlockTest
Test the placing of Instagram block blocks.

Namespace

Drupal\instagram_block\Tests

Code

public function testCoreThemeBlockList() {
  try {
    $this->themeInstaller
      ->install([
      'bartik',
      'seven',
      'stark',
    ]);
  } catch (\Exception $e) {

    // Error exception handler.
  }
  foreach ([
    'bartik',
    'seven',
    'stark',
  ] as $theme) {
    $this
      ->drupalGet("admin/structure/block/library/{$theme}");
    $this
      ->assertText('Instagram block', "Instagram block found in {$theme} theme block selection.");
  }
}