protected function QueueSerializationTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php \Drupal\KernelTests\Core\Queue\QueueSerializationTest::setUp()
Overrides KernelTestBase::setUp
File
- core/
tests/ Drupal/ KernelTests/ Core/ Queue/ QueueSerializationTest.php, line 78
Class
- QueueSerializationTest
- Tests serializing a form with an injected DatabaseQueue instance.
Namespace
Drupal\KernelTests\Core\QueueCode
protected function setUp() : void {
parent::setUp();
$this
->installSchema('system', [
'sequences',
]);
$this
->installEntitySchema('user');
$this->queue = \Drupal::service('queue.database')
->get('aggregator_refresh');
$test_user = User::create([
'name' => 'foobar',
'mail' => 'foobar@example.com',
]);
$test_user
->save();
\Drupal::service('current_user')
->setAccount($test_user);
}