You are here

public function PbfAccessByRoleTest::setUp in Permissions by field 8

Setup and create content whith Pbf field.

Overrides PbfBaseTest::setUp

File

tests/src/Functional/PbfAccessByRoleTest.php, line 23

Class

PbfAccessByRoleTest
Test access permissions with Pbf field which reference role.

Namespace

Drupal\Tests\pbf\Functional

Code

public function setUp() {
  parent::setUp();
  $this->fieldname = 'field_pbf_role';
  $this
    ->attachPbfRoleFields($this->fieldname);
  $this->user = $this
    ->drupalCreateUser($this->permissions);
  $this->article1 = $this
    ->createSimpleArticle('Article 1', $this->fieldname, $this->role1, 1, 0, 0, 0);
  $this->article2 = $this
    ->createSimpleArticle('Article 2', $this->fieldname, $this->role1, 0, 1, 0, 0);
}