ShareThisBlockHelpTest.php in Sharethis block 8
File
tests/src/Functional/ShareThisBlockHelpTest.php
View source
<?php
namespace Drupal\Tests\sharethis_block\Functional;
use Behat\Mink\Exception\ExpectationException;
use Drupal\Core\Entity\EntityStorageException;
use Drupal\Tests\BrowserTestBase;
class ShareThisBlockHelpTest extends BrowserTestBase {
public static $modules = [
'sharethis_block',
'help',
];
protected $profile = 'minimal';
protected $defaultTheme = 'stark';
protected static $userPermissions = [
'access content',
'administer sharethis_block',
'access administration pages',
'view the administration theme',
];
protected function setUp() {
parent::setUp();
$account = $this
->drupalCreateUser(static::$userPermissions);
$this
->drupalLogin($account);
}
public function testAccessHelpPage() {
$this
->drupalGet('/admin/help/sharethis_block');
$this
->assertSession()
->statusCodeEquals(200);
}
public function testHelpPageContent() {
$this
->drupalGet('/admin/help/sharethis_block');
$this
->assertSession()
->pageTextContains('Install the module as usual');
}
}