You are here

public function DibaCarouselBlockTests::testDibaCarouselBlock in Diba carousel slider 8

Tests diba carousel block.

File

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

Class

DibaCarouselBlockTests
Test basic diba_carousel block functionality.

Namespace

Drupal\Tests\diba_carousel\Functional

Code

public function testDibaCarouselBlock() {
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalGet('admin/structure/block/library/stable');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->assertSession()
    ->responseContains('Diba carousel');
  $theme = \Drupal::service('theme_handler')
    ->getDefault();
  $this
    ->drupalGet("admin/structure/block/add/diba_carousel/{$theme}");
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->drupalGet('admin/help/diba_carousel');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}