function it_should_recognize_subject_as_eligible_if_cart_quantity_is_equal_with_configured(PromotionCountableSubjectInterface $subject)
 {
     $subject->getPromotionSubjectCount()->shouldBeCalled()->willReturn(10);
     $this->isEligible($subject, ['count' => 10])->shouldReturn(true);
 }
예제 #2
0
 function it_should_recognize_subject_as_eligible_if_item_count_is_equal_with_configured_depending_on_equal_setting(PromotionCountableSubjectInterface $subject)
 {
     $subject->getPromotionSubjectCount()->shouldBeCalled()->willReturn(10);
     $this->isEligible($subject, array('count' => 10, 'equal' => false))->shouldReturn(false);
     $this->isEligible($subject, array('count' => 10, 'equal' => true))->shouldReturn(true);
 }