You are here

protected function EntityQueueFormWidgetMultipleSubqueuesTest::setUp in Entityqueue Form Widget 8

Same name and namespace in other branches
  1. 2.0.x tests/src/FunctionalJavascript/EntityQueueFormWidgetMultipleSubqueuesTest.php \Drupal\Tests\entityqueue_form_widget\FunctionalJavascript\EntityQueueFormWidgetMultipleSubqueuesTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/FunctionalJavascript/EntityQueueFormWidgetMultipleSubqueuesTest.php, line 49

Class

EntityQueueFormWidgetMultipleSubqueuesTest
Tests the UI for Entity Queue Form Widget with Multiple Subqueues.

Namespace

Drupal\Tests\entityqueue_form_widget\FunctionalJavascript

Code

protected function setUp() {
  parent::setUp();
  $subqueue = EntitySubqueue::create([
    'queue' => 'test_multiple_subqueues',
    'name' => 'subqueue_1',
    'title' => $this
      ->t('Subqueue 1'),
  ]);
  $subqueue
    ->save();
  $subqueue = EntitySubqueue::create([
    'queue' => 'test_multiple_subqueues',
    'name' => 'subqueue_2',
    'title' => $this
      ->t('Subqueue 2'),
  ]);
  $subqueue
    ->save();
  $subqueue = EntitySubqueue::create([
    'queue' => 'test_multiple_subqueues',
    'name' => 'subqueue_3',
    'title' => $this
      ->t('Subqueue 3'),
  ]);
  $subqueue
    ->save();
  $permissions = [
    'view the administration theme',
    'administer nodes',
    'create queued_content content',
    'edit any queued_content content',
    'manipulate all entityqueues',
  ];
  $this->webUser = $this
    ->drupalCreateUser($permissions);
  $this
    ->drupalLogin($this->webUser);
}