You are here

protected function RetryTest::setUp in Commerce Recurring Framework 8

Overrides RecurringKernelTestBase::setUp

File

tests/src/Kernel/Plugin/AdvancedQueue/JobType/RetryTest.php, line 45

Class

RetryTest
@coversDefaultClass \Drupal\commerce_recurring\Plugin\AdvancedQueue\JobType\RecurringJobTypeBase @group commerce_recurring

Namespace

Drupal\Tests\commerce_recurring\Kernel\Plugin\AdvancedQueue\JobType

Code

protected function setUp() : void {
  parent::setUp();
  $this->recurringOrderManager = $this->container
    ->get('commerce_recurring.order_manager');

  /** @var \Drupal\Core\Entity\EntityStorageInterface $queue_storage */
  $queue_storage = $this->container
    ->get('entity_type.manager')
    ->getStorage('advancedqueue_queue');
  $this->queue = $queue_storage
    ->load('commerce_recurring');

  // Ensure that the customer has an email (for dunning emails).
  $this->user
    ->setEmail($this
    ->randomMachineName() . '@example.com');
}