You are here

protected function YamlFormTestTrait::createUsers in YAML Form 8

Create form test users.

3 calls to YamlFormTestTrait::createUsers()
YamlFormNodeResultsTest::testResults in modules/yamlform_node/src/Tests/YamlFormNodeResultsTest.php
Tests form node results.
YamlFormSubmissionTest::testYamlFormSubmission in src/Tests/YamlFormSubmissionTest.php
Tests form submission entity.
YamlFormTestBase::setUp in src/Tests/YamlFormTestBase.php
Sets up a Drupal site for running functional and integration tests.
1 method overrides YamlFormTestTrait::createUsers()
YamlFormHandlerEmailAdvancedTest::createUsers in src/Tests/YamlFormHandlerEmailAdvancedTest.php
Create form test users.

File

src/Tests/YamlFormTestTrait.php, line 71

Class

YamlFormTestTrait
Defines form test trait.

Namespace

Drupal\yamlform\Tests

Code

protected function createUsers() {
  $this->normalUser = $this
    ->drupalCreateUser([
    'access user profiles',
    'access content',
  ]);
  $this->adminFormUser = $this
    ->drupalCreateUser([
    'access user profiles',
    'access content',
    'administer yamlform',
    'administer blocks',
    'administer nodes',
    'administer users',
    'create yamlform',
  ]);
  $this->ownFormUser = $this
    ->drupalCreateUser([
    'access content',
    'access yamlform overview',
    'create yamlform',
    'edit own yamlform',
    'delete own yamlform',
  ]);
  $this->anyFormUser = $this
    ->drupalCreateUser([
    'access content',
    'access yamlform overview',
    'create yamlform',
    'edit any yamlform',
    'delete any yamlform',
  ]);
  $this->adminSubmissionUser = $this
    ->drupalCreateUser([
    'access user profiles',
    'access content',
    'administer yamlform submission',
  ]);
}