protected function EmailRegistrationLoginTest::addProductToCart in Email Registration 8
Adds the given product to the cart.
Parameters
\Drupal\commerce_product\Entity\ProductInterface $product: The product to add to the cart.
1 call to EmailRegistrationLoginTest::addProductToCart()
- EmailRegistrationLoginTest::setUp in tests/
src/ Functional/ Plugin/ Commerce/ CheckoutPane/ EmailRegistrationLoginTest.php
File
- tests/
src/ Functional/ Plugin/ Commerce/ CheckoutPane/ EmailRegistrationLoginTest.php, line 269
Class
- EmailRegistrationLoginTest
- Tests the login checkout pane.
Namespace
Drupal\Tests\email_registration\Functional\Plugin\Commerce\CheckoutPaneCode
protected function addProductToCart(ProductInterface $product) {
$this
->drupalGet($product
->toUrl()
->toString());
$this
->submitForm([], 'Add to cart');
}