You are here

protected function QueueSerializationTest::setUp in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/system/src/Tests/Queue/QueueSerializationTest.php \Drupal\system\Tests\Queue\QueueSerializationTest::setUp()

Performs setup tasks before each individual test method is run.

Overrides KernelTestBase::setUp

File

core/modules/system/src/Tests/Queue/QueueSerializationTest.php, line 82
Contains \Drupal\system\Tests\Queue\QueueSerializationTest.

Class

QueueSerializationTest
Tests serializing a form with an injected DatabaseQueue instance.

Namespace

Drupal\system\Tests\Queue

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installSchema('system', [
    'key_value_expire',
    'sequences',
    'queue',
  ]);
  $this
    ->installEntitySchema('user');
  $this->queue = \Drupal::service('queue.database')
    ->get('aggregator_refresh');
  $test_user = User::create(array(
    'name' => 'foobar',
    'mail' => 'foobar@example.com',
  ));
  $test_user
    ->save();
  \Drupal::service('current_user')
    ->setAccount($test_user);
}