@@ 704-712 (lines=9) @@ | ||
701 | } |
|
702 | ||
703 | ||
704 | public function testAddCoupon() |
|
705 | { |
|
706 | $this->object->addProduct( $this->testItem->getId(), 2 ); |
|
707 | $this->object->addCoupon( 'GHIJ' ); |
|
708 | ||
709 | $basket = $this->object->get(); |
|
710 | ||
711 | $this->assertEquals( 1, count( $basket->getCoupons() ) ); |
|
712 | } |
|
713 | ||
714 | ||
715 | public function testAddCouponInvalidCode() |
|
@@ 729-738 (lines=10) @@ | ||
726 | } |
|
727 | ||
728 | ||
729 | public function testDeleteCoupon() |
|
730 | { |
|
731 | $this->object->addProduct( $this->testItem->getId(), 2 ); |
|
732 | $this->object->addCoupon( '90AB' ); |
|
733 | $this->object->deleteCoupon( '90AB' ); |
|
734 | ||
735 | $basket = $this->object->get(); |
|
736 | ||
737 | $this->assertEquals( 0, count( $basket->getCoupons() ) ); |
|
738 | } |
|
739 | ||
740 | ||
741 | public function testClear() |