You are here

protected function InvoiceFileManagerTest::setUp in Commerce Invoice 8.2

Overrides InvoiceKernelTestBase::setUp

File

tests/src/Kernel/InvoiceFileManagerTest.php, line 43

Class

InvoiceFileManagerTest
Tests the invoice file manager.

Namespace

Drupal\Tests\commerce_invoice\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $user = $this
    ->createUser();
  $this->user = $this
    ->reloadEntity($user);
  $profile = Profile::create([
    'type' => 'customer',
    'address' => [
      'country_code' => 'US',
      'postal_code' => '53177',
      'locality' => 'Milwaukee',
      'address_line1' => 'Pabst Blue Ribbon Dr',
      'administrative_area' => 'WI',
      'given_name' => 'Frederick',
      'family_name' => 'Pabst',
    ],
    'uid' => $this->user
      ->id(),
  ]);
  $profile
    ->save();
  $this->profile = $this
    ->reloadEntity($profile);
  $this->fileManager = $this->container
    ->get('commerce_invoice.invoice_file_manager');
}