mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-11 18:54:33 +00:00
Changed $taxRate from private to public, Solve https://github.com/Crinsane/LaravelShoppingcart/issues/436
This commit is contained in:
@@ -756,6 +756,20 @@ class CartTest extends TestCase
|
||||
$this->assertEquals('1.050,00', $cart->tax(2, ',', '.'));
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function it_can_access_tax_as_percentage()
|
||||
{
|
||||
$cart = $this->getCart();
|
||||
|
||||
$cart->add(new BuyableProduct(1, 'Some title', 10.00), 1);
|
||||
|
||||
$cart->setTax('027c91341fd5cf4d2579b49c4b6a90da', 19);
|
||||
|
||||
$cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da');
|
||||
|
||||
$this->assertEquals(19, $cartItem->taxRate);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function it_can_return_the_subtotal()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user