You are here

protected function UbercartTestBase::addToCart in Ubercart 8.4

Adds a product to the cart.

2 calls to UbercartTestBase::addToCart()
QuoteTest::testNoQuote in shipping/uc_quote/src/Tests/QuoteTest.php
Verifies shipping pane is hidden when there are no shippable items.
QuoteTest::testQuote in shipping/uc_quote/src/Tests/QuoteTest.php
Tests basic flatrate shipping quote functionality.

File

uc_store/src/Tests/UbercartTestBase.php, line 216

Class

UbercartTestBase
Base class for Ubercart Simpletest tests.

Namespace

Drupal\uc_store\Tests

Code

protected function addToCart($product, array $options = []) {
  $this
    ->drupalPostForm('node/' . $product
    ->id(), $options, 'Add to cart');
}