public function BibciteTest::testCslStyleRoutes in Bibliography & Citation 2.0.x
Same name and namespace in other branches
- 8 tests/src/Functional/BibciteTest.php \Drupal\Tests\bibcite\Functional\BibciteTest::testCslStyleRoutes()
Test CSL style routes.
File
- tests/
src/ Functional/ BibciteTest.php, line 56
Class
- BibciteTest
- Test for main module functions.
Namespace
Drupal\Tests\bibcite\FunctionalCode
public function testCslStyleRoutes() {
$this
->drupalGet('/admin/config/bibcite/settings/csl_style/add');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('/admin/config/bibcite/settings/csl_style/apa/delete');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('/admin/config/bibcite/settings/csl_style/apa');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('/admin/config/bibcite/settings/csl_style');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('/admin/config/bibcite/settings/csl_style/add-file');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalLogin($this->user);
$this
->drupalGet('/admin/config/bibcite/settings/csl_style/add');
$this
->assertSession()
->statusCodeEquals(200);
$this
->drupalGet('/admin/config/bibcite/settings/csl_style/apa/delete');
$this
->assertSession()
->statusCodeEquals(200);
$this
->drupalGet('/admin/config/bibcite/settings/csl_style/apa');
$this
->assertSession()
->statusCodeEquals(200);
$this
->drupalGet('/admin/config/bibcite/settings/csl_style');
$this
->assertSession()
->statusCodeEquals(200);
$this
->drupalGet('/admin/config/bibcite/settings/csl_style/add-file');
$this
->assertSession()
->statusCodeEquals(200);
$this
->drupalLogin($this->simpleUser);
$this
->drupalGet('/admin/config/bibcite/settings/csl_style/add');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('/admin/config/bibcite/settings/csl_style/apa/delete');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('/admin/config/bibcite/settings/csl_style/apa');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('/admin/config/bibcite/settings/csl_style');
$this
->assertSession()
->statusCodeEquals(403);
$this
->drupalGet('/admin/config/bibcite/settings/csl_style/add-file');
$this
->assertSession()
->statusCodeEquals(403);
}