SimpleInstagramFeedTest.php in Simple Instagram Feed Block 1.0.x
File
tests/src/Functional/SimpleInstagramFeedTest.php
View source
<?php
namespace Drupal\Tests\simple_instagram_feed\Functional;
use Drupal\Tests\BrowserTestBase;
class SimpleInstagramFeedTest extends BrowserTestBase {
public static $modules = [
'simple_instagram_feed',
];
protected $defaultTheme = 'stable';
protected $adminUser;
protected function setUp() {
parent::setUp();
$this->adminUser = $this
->drupalCreateUser([
'view the administration theme',
'access administration pages',
'administer blocks',
]);
}
public function testsSimpleInstagramFeedBlock() {
$this
->drupalLogin($this->adminUser);
$this
->drupalGet('admin/structure/block/library/stable');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->responseContains('Simple Instagram Feed');
$theme = \Drupal::service('theme_handler')
->getDefault();
$this
->drupalGet("admin/structure/block/add/simple_instagram_block/{$theme}");
$this
->assertSession()
->statusCodeEquals(200);
}
}