protected function OrderInvoiceTest::setUp in Ubercart 8.4
Overrides BrowserTestBase::setUp
File
- uc_order/
tests/ src/ Functional/ OrderInvoiceTest.php, line 62
Class
- OrderInvoiceTest
- Tests order administration page invoice tab functionality.
Namespace
Drupal\Tests\uc_order\FunctionalCode
protected function setUp() {
parent::setUp();
$this->adminUser = $this
->drupalCreateUser([
'access user profiles',
'view customers',
'view all orders',
]);
$this->customer = $this
->drupalCreateUser();
$country = Country::load('US');
$this->order = Order::create([
'uid' => $this->customer
->id(),
'billing_country' => $country
->id(),
'billing_zone' => 'AK',
]);
$this->order
->save();
// Ensure test mails are logged.
\Drupal::configFactory()
->getEditable('system.mail')
->set('interface.uc_order', 'test_html_mail_collector')
->save();
}