public function ConfigurationPermissionTest::testAccess in Apigee Edge 8
Tests access to the admin pages with admin/authenticated/anonymous roles.
File
- tests/
src/ Functional/ ConfigurationPermissionTest.php, line 52
Class
- ConfigurationPermissionTest
- Module administration permission test.
Namespace
Drupal\Tests\apigee_edge\FunctionalCode
public function testAccess() {
// Test access with admin role.
$this
->drupalLogin($this->rootUser);
$this
->assertPaths(TRUE);
// Test access with authenticated role. It is not necessary to create a
// developer here so skip apigee_edge_user_presave().
$this
->disableUserPresave();
$account = $this
->createAccount();
$this
->enableUserPresave();
$this
->drupalLogin($account);
$this
->assertPaths(FALSE);
// Test access with anonymous role.
$this
->drupalLogout();
$this
->assertPaths(FALSE);
}