You are here

public function BibciteEntityTest::testContributorRoutes in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x modules/bibcite_entity/tests/src/Functional/BibciteEntityTest.php \Drupal\Tests\bibcite_entity\Functional\BibciteEntityTest::testContributorRoutes()

Test Contributor routes.

File

modules/bibcite_entity/tests/src/Functional/BibciteEntityTest.php, line 222

Class

BibciteEntityTest
Test for entity functions.

Namespace

Drupal\Tests\bibcite_entity\Functional

Code

public function testContributorRoutes() {
  $this
    ->drupalGet('bibcite/contributor/1');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('bibcite/contributor/1/edit');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('bibcite/contributor/1/delete');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('bibcite/contributor/add');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('admin/content/bibcite/contributor');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('admin/content/bibcite/contributor/delete');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('admin/content/bibcite/contributor/1/merge');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('admin/content/bibcite/contributor/1/merge/2');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalLogin($this->user);
  $this
    ->drupalGet('bibcite/contributor/1');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->drupalGet('bibcite/contributor/1/edit');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->drupalGet('bibcite/contributor/1/delete');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->drupalGet('bibcite/contributor/add');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->drupalGet('admin/content/bibcite/contributor');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->drupalGet('admin/content/bibcite/contributor/delete');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->drupalGet('admin/content/bibcite/contributor/1/merge');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->drupalGet('admin/content/bibcite/contributor/1/merge/2');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->drupalLogin($this->simpleUser);
  $this
    ->drupalGet('bibcite/contributor/1');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('bibcite/contributor/1/edit');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('bibcite/contributor/1/delete');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('bibcite/contributor/add');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('admin/content/bibcite/contributor');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('admin/content/bibcite/contributor/delete');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('admin/content/bibcite/contributor/1/merge');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('admin/content/bibcite/contributor/1/merge/2');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
}