function it_throws_exception_if_grand_total_is_present_on_the_page_but_should_not(CartSummaryPage $cartSummaryPage) { $cartSummaryPage->open()->shouldBeCalled(); $cartSummaryPage->getGrandTotal()->willReturn('$10.00'); $this->shouldThrow(new FailureException('Expected to get exception, none got.'))->during('cartShouldBeEmptyWithNoValue', []); }
function it_throws_not_equal_exception_if_grand_total_is_incorrect(CartSummaryPage $cartSummaryPage) { $cartSummaryPage->open()->shouldBeCalled(); $cartSummaryPage->getGrandTotal()->willReturn('$90.00'); $this->shouldThrow(NotEqualException::class)->during('myCartTotalShouldBe', ['$100.00']); }
/** * @Then my cart total should be :total */ public function myCartTotalShouldBe($total) { $this->cartSummaryPage->open(); expect($this->cartSummaryPage->getGrandTotal())->toBe($total); }
function it_checks_if_cart_has_given_total(CartSummaryPage $cartSummaryPage) { $cartSummaryPage->open()->shouldBeCalled(); $cartSummaryPage->getGrandTotal()->willReturn('$100.00'); $this->myCartTotalShouldBe('$100.00'); }