public function ContentRoleFormTest::test in Lightning Core 8.5
Same name and namespace in other branches
- 8.3 modules/lightning_roles/tests/src/Functional/ContentRoleFormTest.php \Drupal\Tests\lightning_roles\Functional\ContentRoleFormTest::test()
- 8.4 modules/lightning_roles/tests/src/Functional/ContentRoleFormTest.php \Drupal\Tests\lightning_roles\Functional\ContentRoleFormTest::test()
File
- modules/
lightning_roles/ tests/ src/ Functional/ ContentRoleFormTest.php, line 28
Class
- ContentRoleFormTest
- @group lightning_roles @group lightning_core @group lightning @group orca_public
Namespace
Drupal\Tests\lightning_roles\FunctionalCode
public function test() {
$account = $this
->createUser([], NULL, TRUE);
$this
->drupalLogin($account);
$this
->drupalGet("/admin/config/system/lightning/roles");
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->fieldExists('content_roles[reviewer]')
->check();
$this
->assertSession()
->buttonExists('Save configuration')
->press();
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->fieldExists('content_roles[reviewer]')
->uncheck();
$this
->assertSession()
->buttonExists('Save configuration')
->press();
$this
->assertSession()
->statusCodeEquals(200);
}