protected function UbercartJavascriptTestBase::addToCart in Ubercart 8.4
Adds a product to the cart.
2 calls to UbercartJavascriptTestBase::addToCart()
- AjaxTest::testCheckoutAjax in uc_store/
tests/ src/ FunctionalJavascript/ AjaxTest.php - Tests Ajax on the checkout form.
- AjaxTest::testCheckoutPaneAjax in uc_store/
tests/ src/ FunctionalJavascript/ AjaxTest.php - Tests Ajax on the checkout panes.
File
- uc_store/
tests/ src/ FunctionalJavascript/ UbercartJavascriptTestBase.php, line 119
Class
- UbercartJavascriptTestBase
- Base class for Ubercart PHPUnit browser tests.
Namespace
Drupal\Tests\uc_store\FunctionalJavascriptCode
protected function addToCart($product, array $options = []) {
$this
->drupalGet('node/' . $product
->id());
$this
->submitForm($options, 'Add to cart');
}