protected function CartCheckoutTest::setUp in Ubercart 8.4
Overrides UbercartBrowserTestBase::setUp
File
- uc_cart/
tests/ src/ Functional/ CartCheckoutTest.php, line 44
Class
- CartCheckoutTest
- Tests the cart and checkout functionality.
Namespace
Drupal\Tests\uc_cart\FunctionalCode
protected function setUp() {
parent::setUp();
// Need page_title_block because we test page titles.
$this
->drupalPlaceBlock('page_title_block');
// Get a reference to the cart.
$this->cartManager = \Drupal::service('uc_cart.manager');
$this->cart = $this->cartManager
->get();
// Create a simple customer user account.
$this->customer = $this
->drupalCreateUser();
// Create a payment method.
$this
->createPaymentMethod('check');
// Ensure test mails are logged.
\Drupal::configFactory()
->getEditable('system.mail')
->set('interface.uc_order', 'test_mail_collector')
->save();
}