LukePOLO\LaraCart\Tests\LaraCartTestTrait::addItem PHP Method

addItem() private method

Easy way to add an item for many tests.
private addItem ( integer $qty = 1, integer $price = 1, boolean $taxable = true, array $options = [] ) : mixed
$qty integer
$price integer
$taxable boolean
$options array
return mixed
    private function addItem($qty = 1, $price = 1, $taxable = true, $options = [])
    {
        if (empty($options)) {
            $options = ['b_test' => 'option_1', 'a_test' => 'option_2'];
        }
        return $this->laracart->add('itemID', 'Testing Item', $qty, $price, $options, $taxable);
    }