You are here

public function SimpleInstagramFeedTest::testsSimpleInstagramFeedBlock in Simple Instagram Feed Block 1.0.x

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/SimpleInstagramFeedTest.php \Drupal\Tests\simple_instagram_feed\Functional\SimpleInstagramFeedTest::testsSimpleInstagramFeedBlock()

Tests Simple Instagram Feed block.

File

tests/src/Functional/SimpleInstagramFeedTest.php, line 48

Class

SimpleInstagramFeedTest
Provides a class for Simple Instagram Feed functional tests.

Namespace

Drupal\Tests\simple_instagram_feed\Functional

Code

public function testsSimpleInstagramFeedBlock() {
  $this
    ->drupalLogin($this->adminUser);

  // Block is listed in site block library.
  $this
    ->drupalGet('admin/structure/block/library/stable');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->assertSession()
    ->responseContains('Simple Instagram Feed');

  // Add block form is available.
  $theme = \Drupal::service('theme_handler')
    ->getDefault();
  $this
    ->drupalGet("admin/structure/block/add/simple_instagram_block/{$theme}");
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}