You are here

protected function InvoiceKernelTestBase::setUp in Commerce Invoice 8.2

Overrides OrderKernelTestBase::setUp

8 calls to InvoiceKernelTestBase::setUp()
InvoiceConfirmationMailTest::setUp in tests/src/Kernel/Mail/InvoiceConfirmationMailTest.php
InvoiceConfirmationTest::setUp in tests/src/Kernel/InvoiceConfirmationTest.php
InvoiceFileManagerTest::setUp in tests/src/Kernel/InvoiceFileManagerTest.php
InvoiceGeneratorTest::setUp in tests/src/Kernel/InvoiceGeneratorTest.php
InvoicePrintBuilderTest::setUp in tests/src/Kernel/InvoicePrintBuilderTest.php

... See full list

8 methods override InvoiceKernelTestBase::setUp()
InvoiceConfirmationMailTest::setUp in tests/src/Kernel/Mail/InvoiceConfirmationMailTest.php
InvoiceConfirmationTest::setUp in tests/src/Kernel/InvoiceConfirmationTest.php
InvoiceFileManagerTest::setUp in tests/src/Kernel/InvoiceFileManagerTest.php
InvoiceGeneratorTest::setUp in tests/src/Kernel/InvoiceGeneratorTest.php
InvoicePrintBuilderTest::setUp in tests/src/Kernel/InvoicePrintBuilderTest.php

... See full list

File

tests/src/Kernel/InvoiceKernelTestBase.php, line 31

Class

InvoiceKernelTestBase
Provides a base class for invoice kernel tests.

Namespace

Drupal\Tests\commerce_invoice\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('commerce_invoice_item');
  $this
    ->installEntitySchema('commerce_invoice');
  $this
    ->installEntitySchema('file');
  $this
    ->installConfig([
    'commerce_invoice',
    'entity_print',
    'entity_print_test',
    'commerce_order',
    'system',
  ]);
  $this->container
    ->get('theme_installer')
    ->install([
    'stark',
  ]);

  // Set the default print engine.
  $config = $this->container
    ->get('config.factory')
    ->getEditable('entity_print.settings');
  $config
    ->set('print_engines.pdf_engine', 'testprintengine')
    ->save();
  $private = FileSystem::getOsTemporaryDirectory();
  $this
    ->setSetting('file_private_path', $private);
}