public function ConfigEntityDescriptionTest::testRole in Lightning Core 8.4
Same name and namespace in other branches
- 8.5 tests/src/Functional/ConfigEntityDescriptionTest.php \Drupal\Tests\lightning_core\Functional\ConfigEntityDescriptionTest::testRole()
- 8.3 tests/src/Functional/ConfigEntityDescriptionTest.php \Drupal\Tests\lightning_core\Functional\ConfigEntityDescriptionTest::testRole()
File
- tests/
src/ Functional/ ConfigEntityDescriptionTest.php, line 33
Class
- ConfigEntityDescriptionTest
- @group lightning_core
Namespace
Drupal\Tests\lightning_core\FunctionalCode
public function testRole() {
$page = $this
->getSession()
->getPage();
$assert_session = $this
->assertSession();
$account = $this
->drupalCreateUser([
'access administration pages',
'administer users',
'administer permissions',
]);
$this
->drupalLogin($account);
$this
->drupalGet("/admin/people/roles/add");
$assert_session
->statusCodeEquals(200);
$page
->fillField('Role name', 'Foobaz');
$page
->fillField('id', 'foobaz');
$page
->fillField('Description', 'I am godd here');
$page
->pressButton('Save');
$this
->drupalGet('/user');
$assert_session
->statusCodeEquals(200);
$page
->clickLink('Edit');
$page
->pressButton('Save');
$assert_session
->pageTextContains('I am godd here');
}