ContentRoleFormTest.php in Lightning Core 8.4
File
modules/lightning_roles/tests/src/Functional/ContentRoleFormTest.php
View source
<?php
namespace Drupal\Tests\lightning_roles\Functional;
use Drupal\Tests\BrowserTestBase;
class ContentRoleFormTest extends BrowserTestBase {
protected static $modules = [
'lightning_core',
'lightning_roles',
];
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);
}
}
Classes
Name |
Description |
ContentRoleFormTest |
@group lightning_roles
@group lightning_core
@group lightning
@group orca_public |