コード例 #1
0
ファイル: CartContext.php プロジェクト: rpg600/Sylius
 /**
  * @Then my cart promotions should be :promotionsTotal
  * @Then my discount should be :promotionsTotal
  */
 public function myDiscountShouldBe($promotionsTotal)
 {
     $this->cartSummaryPage->open();
     expect($this->cartSummaryPage->getPromotionTotal())->toBe($promotionsTotal);
 }
コード例 #2
0
ファイル: CartContextSpec.php プロジェクト: ahmadrabie/Sylius
 function it_throws_exception_if_discount_info_is_present_on_the_page_but_should_not(CartSummaryPageInterface $cartSummaryPage)
 {
     $cartSummaryPage->open()->shouldBeCalled();
     $cartSummaryPage->getPromotionTotal()->willReturn('$10.00');
     $this->shouldThrow(new FailureException('Expected to get exception, none got.'))->during('thereShouldBeNoDiscount');
 }