public function BibciteEntityTest::testContributorRoleRoutes in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_entity/tests/src/Functional/BibciteEntityTest.php \Drupal\Tests\bibcite_entity\Functional\BibciteEntityTest::testContributorRoleRoutes()
Test Contributor role routes.
File
- modules/
bibcite_entity/ tests/ src/ Functional/ BibciteEntityTest.php, line 318
Class
- BibciteEntityTest
- Test for entity functions.
Namespace
Drupal\Tests\bibcite_entity\FunctionalCode
public function testContributorRoleRoutes() {
$this
->drupalGet('admin/structure/bibcite/contributor/settings/role/author');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('admin/structure/bibcite/contributor/settings/role/author/delete');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('admin/structure/bibcite/contributor/settings/role/add');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('admin/structure/bibcite/contributor/settings/role');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalLogin($this->user);
$this
->drupalGet('admin/structure/bibcite/contributor/settings/role/author');
$this
->assertSession()
->statusCodeEquals(200);
$this
->drupalGet('admin/structure/bibcite/contributor/settings/role/author/delete');
$this
->assertSession()
->statusCodeEquals(200);
$this
->drupalGet('admin/structure/bibcite/contributor/settings/role/add');
$this
->assertSession()
->statusCodeEquals(200);
$this
->drupalGet('admin/structure/bibcite/contributor/settings/role');
$this
->assertSession()
->statusCodeEquals(200);
$this
->drupalLogin($this->simpleUser);
$this
->drupalGet('admin/structure/bibcite/contributor/settings/role/author');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('admin/structure/bibcite/contributor/settings/role/author/delete');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('admin/structure/bibcite/contributor/settings/role/add');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('admin/structure/bibcite/contributor/settings/role');
$this
->assertSession()
->statusCodeEquals(403);
}