public function BibciteEntityTest::testReferenceTypeRoutes 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::testReferenceTypeRoutes()
Test Reference type routes.
File
- modules/
bibcite_entity/ tests/ src/ Functional/ BibciteEntityTest.php, line 72
Class
- BibciteEntityTest
- Test for entity functions.
Namespace
Drupal\Tests\bibcite_entity\FunctionalCode
public function testReferenceTypeRoutes() {
$this
->drupalGet('admin/structure/bibcite/reference/settings/types/add');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('admin/structure/bibcite/reference/settings/types/book/delete');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('admin/structure/bibcite/reference/settings/types/book');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('admin/structure/bibcite/reference/settings/types');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalLogin($this->user);
$this
->drupalGet('admin/structure/bibcite/reference/settings/types/add');
$this
->assertSession()
->statusCodeEquals(200);
$this
->drupalGet('admin/structure/bibcite/reference/settings/types/book/delete');
$this
->assertSession()
->statusCodeEquals(200);
$this
->drupalGet('admin/structure/bibcite/reference/settings/types/book');
$this
->assertSession()
->statusCodeEquals(200);
$this
->drupalGet('admin/structure/bibcite/reference/settings/types');
$this
->assertSession()
->statusCodeEquals(200);
$this
->drupalLogin($this->simpleUser);
$this
->drupalGet('admin/structure/bibcite/reference/settings/types/add');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('admin/structure/bibcite/reference/settings/types/book/delete');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('admin/structure/bibcite/reference/settings/types/book');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('admin/structure/bibcite/reference/settings/types');
$this
->assertSession()
->statusCodeEquals(403);
}