public function PbfAccessByUserRefTest::setUp in Permissions by field 8
Setup and create content whith Pbf field.
Overrides PbfBaseTest::setUp
File
- tests/
src/ Functional/ PbfAccessByUserRefTest.php, line 29
Class
- PbfAccessByUserRefTest
- Test access permissions with Pbf field with user referenced.
Namespace
Drupal\Tests\pbf\FunctionalCode
public function setUp() {
parent::setUp();
$this->fieldname = 'field_pbf_user';
$this->userMethod = 'ref_user';
$this
->attachPbfUserFields($this->fieldname, $this->userMethod);
$this->user = $this
->drupalCreateUser($this->permissions);
$this->article1 = $this
->createSimpleArticle('Article 1', $this->fieldname, $this->user
->id(), 1, 0, 0, 0);
$this->article2 = $this
->createSimpleArticle('Article 2', $this->fieldname, $this->user
->id(), 0, 1, 0, 0);
}