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