You are here

protected function TestTrait::initializeQueuersService in Purge 8.3

Make $this->purgeQueuers available.

Parameters

string[] $plugin_ids: Array of plugin ids to be enabled.

bool $write_empty: Write empty plugin configurations.

10 calls to TestTrait::initializeQueuersService()
DashboardQueuersQueueProcessorsTest::testQueuersSection in modules/purge_ui/tests/src/Functional/DashboardQueuersQueueProcessorsTest.php
Test the queuers section of the dashboard.
QueueBrowserFormTest::setUp in modules/purge_ui/tests/src/Functional/Form/QueueBrowserFormTest.php
Setup the test.
QueueEmptyFormTest::setUp in modules/purge_ui/tests/src/Functional/Form/QueueEmptyFormTest.php
Setup the test.
QueuerAddFormTest::testAddPresence in modules/purge_ui/tests/src/Functional/Form/QueuerAddFormTest.php
Tests that the right queuers are listed on the form.
QueuerAddFormTest::testAddSubmit in modules/purge_ui/tests/src/Functional/Form/QueuerAddFormTest.php
Tests form submission results in the redirect command.

... See full list

File

tests/src/Traits/TestTrait.php, line 174

Class

TestTrait
Several helper properties and methods for purge tests.

Namespace

Drupal\Tests\purge\Traits

Code

protected function initializeQueuersService(array $plugin_ids = [], $write_empty = FALSE) : void {
  if (is_null($this->purgeQueuers)) {
    $this->purgeQueuers = $this->container
      ->get('purge.queuers');
  }
  if (count($plugin_ids) || $write_empty) {
    $this->purgeQueuers
      ->reload();
    $this->purgeQueuers
      ->setPluginsEnabled($plugin_ids);
  }
}