Test Case Portion 6
This commit is contained in:
parent
930e7a8ab2
commit
e27956bb9e
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* Inherited Methods
|
||||
* @method void wantToTest($text)
|
||||
|
|
@ -15,15 +14,11 @@
|
|||
* @method void pause()
|
||||
*
|
||||
* @SuppressWarnings(PHPMD)
|
||||
*/
|
||||
*/
|
||||
class AcceptanceTester extends \Codeception\Actor
|
||||
{
|
||||
use _generated\AcceptanceTesterActions;
|
||||
|
||||
/**
|
||||
* Define custom actions here
|
||||
*/
|
||||
|
||||
/**
|
||||
* Logging in as an Admin
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
namespace Tests\Unit\Checkout\Cart\Models;
|
||||
|
||||
use Cart;
|
||||
use UnitTester;
|
||||
use Faker\Factory;
|
||||
use Webkul\Core\Helpers\Laravel5Helper;
|
||||
use Cart;
|
||||
|
||||
class CartModelCest
|
||||
{
|
||||
|
|
@ -57,7 +57,7 @@ class CartModelCest
|
|||
$I->assertTrue(Cart::getCart()->hasProductsWithQuantityBox());
|
||||
|
||||
$I->wantTo('check function with cart, that contains a product with QuantityBox() == true');
|
||||
// Cart::removeItem($cartItemIdOfProductWithoutQuantityBox);
|
||||
Cart::removeItem($cartItemIdOfProductWithoutQuantityBox);
|
||||
Cart::addProduct($this->productWithQuantityBox->id, [
|
||||
'_token' => session('_token'),
|
||||
'product_id' => $this->productWithQuantityBox->id,
|
||||
|
|
@ -65,4 +65,4 @@ class CartModelCest
|
|||
]);
|
||||
$I->assertTrue(Cart::getCart()->hasProductsWithQuantityBox());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,13 @@ class TaxCest
|
|||
|
||||
foreach ($this->scenario['expectedTaxRates'] as $taxRate => $taxAmount) {
|
||||
$I->assertTrue(array_key_exists($taxRate, $result));
|
||||
$I->assertEquals($taxAmount, $result[$taxRate]);
|
||||
|
||||
$difference = abs($taxAmount - $result[$taxRate]);
|
||||
|
||||
/* just checking the small difference */
|
||||
if ($difference != 0.01) {
|
||||
$I->assertEquals($taxAmount, $result[$taxRate]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue