AdminFunctionalityTest.php in Synonyms 8
File
tests/src/Functional/AdminFunctionalityTest.php
View source
<?php
namespace Drupal\Tests\synonyms\Functional;
use Drupal\Tests\BrowserTestBase;
class AdminFunctionalityTest extends BrowserTestBase {
public static $modules = [
'synonyms',
'synonyms_search',
'synonyms_views_filter',
'synonyms_views_argument_validator',
];
protected $strictConfigSchema = FALSE;
protected $defaultTheme = 'stark';
public function setUp() {
parent::setUp();
$this->container
->get('router.builder')
->rebuild();
$account = $this
->drupalCreateUser([
'access synonyms entity autocomplete',
'administer synonyms',
]);
$this
->drupalLogin($account);
}
public function testSynonymsAdmin() {
$this
->drupalGet('admin/structure/synonyms');
$session = $this
->assertSession();
$session
->statusCodeEquals(200);
$session
->pageTextContains('Synonyms');
$session
->pageTextContains('ENTITY TYPE');
$session
->pageTextContains('BUNDLE');
$session
->pageTextContains('MANAGE');
$session
->pageTextContains('User');
$session
->pageTextContains('Autocomplete');
$session
->pageTextContains('Select');
$session
->pageTextContains('Search');
}
}