@@ 702-719 (lines=18) @@ | ||
699 | * @covers ::getDisplayBank |
|
700 | * @covers ::isBool |
|
701 | */ |
|
702 | public function testSetDisplayBank() |
|
703 | { |
|
704 | // Test the default value |
|
705 | $this->assertTrue($this->paymentSlip->getDisplayBank()); |
|
706 | ||
707 | // Disable feature, also check for returned instance |
|
708 | $returned = $this->paymentSlip->setDisplayBank(false); |
|
709 | $this->assertInstanceOf('SwissPaymentSlip\SwissPaymentSlip\Tests\TestablePaymentSlip', $returned); |
|
710 | $this->assertFalse($this->paymentSlip->getDisplayBank()); |
|
711 | ||
712 | // Re-enable the feature |
|
713 | $this->paymentSlip->setDisplayBank(); |
|
714 | $this->assertTrue($this->paymentSlip->getDisplayBank()); |
|
715 | ||
716 | // Check if the data is disabled |
|
717 | $this->paymentSlip->getPaymentSlipData()->setWithBank(false); |
|
718 | $this->assertFalse($this->paymentSlip->getDisplayBank()); |
|
719 | } |
|
720 | ||
721 | /** |
|
722 | * Tests the setDisplayBank method with an invalid parameter |
|
@@ 743-760 (lines=18) @@ | ||
740 | * @covers ::getDisplayAccount |
|
741 | * @covers ::isBool |
|
742 | */ |
|
743 | public function testSetDisplayAccount() |
|
744 | { |
|
745 | // Test the default value |
|
746 | $this->assertTrue($this->paymentSlip->getDisplayAccount()); |
|
747 | ||
748 | // Disable feature, also check for returned instance |
|
749 | $returned = $this->paymentSlip->setDisplayAccount(false); |
|
750 | $this->assertInstanceOf('SwissPaymentSlip\SwissPaymentSlip\Tests\TestablePaymentSlip', $returned); |
|
751 | $this->assertFalse($this->paymentSlip->getDisplayAccount()); |
|
752 | ||
753 | // Re-enable the feature |
|
754 | $this->paymentSlip->setDisplayAccount(); |
|
755 | $this->assertTrue($this->paymentSlip->getDisplayAccount()); |
|
756 | ||
757 | // Check if the data is disabled |
|
758 | $this->paymentSlip->getPaymentSlipData()->setWithAccountNumber(false); |
|
759 | $this->assertFalse($this->paymentSlip->getDisplayAccount()); |
|
760 | } |
|
761 | ||
762 | /** |
|
763 | * Tests the setDisplayAccount method with an invalid parameter |
|
@@ 784-801 (lines=18) @@ | ||
781 | * @covers ::getDisplayRecipient |
|
782 | * @covers ::isBool |
|
783 | */ |
|
784 | public function testSetDisplayRecipient() |
|
785 | { |
|
786 | // Test the default value |
|
787 | $this->assertTrue($this->paymentSlip->getDisplayRecipient()); |
|
788 | ||
789 | // Disable feature, also check for returned instance |
|
790 | $returned = $this->paymentSlip->setDisplayRecipient(false); |
|
791 | $this->assertInstanceOf('SwissPaymentSlip\SwissPaymentSlip\Tests\TestablePaymentSlip', $returned); |
|
792 | $this->assertFalse($this->paymentSlip->getDisplayRecipient()); |
|
793 | ||
794 | // Re-enable the feature |
|
795 | $this->paymentSlip->setDisplayRecipient(); |
|
796 | $this->assertTrue($this->paymentSlip->getDisplayRecipient()); |
|
797 | ||
798 | // Check if the data is disabled |
|
799 | $this->paymentSlip->getPaymentSlipData()->setWithRecipient(false); |
|
800 | $this->assertFalse($this->paymentSlip->getDisplayRecipient()); |
|
801 | } |
|
802 | ||
803 | /** |
|
804 | * Tests the setDisplayRecipient method with an invalid parameter |
|
@@ 825-842 (lines=18) @@ | ||
822 | * @covers ::getDisplayAmount |
|
823 | * @covers ::isBool |
|
824 | */ |
|
825 | public function testSetDisplayAmount() |
|
826 | { |
|
827 | // Test the default value |
|
828 | $this->assertTrue($this->paymentSlip->getDisplayAmount()); |
|
829 | ||
830 | // Disable feature, also check for returned instance |
|
831 | $returned = $this->paymentSlip->setDisplayAmount(false); |
|
832 | $this->assertInstanceOf('SwissPaymentSlip\SwissPaymentSlip\Tests\TestablePaymentSlip', $returned); |
|
833 | $this->assertFalse($this->paymentSlip->getDisplayAmount()); |
|
834 | ||
835 | // Re-enable the feature |
|
836 | $this->paymentSlip->setDisplayAmount(); |
|
837 | $this->assertTrue($this->paymentSlip->getDisplayAmount()); |
|
838 | ||
839 | // Check if the data is disabled |
|
840 | $this->paymentSlip->getPaymentSlipData()->setWithAmount(false); |
|
841 | $this->assertFalse($this->paymentSlip->getDisplayAmount()); |
|
842 | } |
|
843 | ||
844 | /** |
|
845 | * Tests the setDisplayAmount method with an invalid parameter |
|
@@ 866-883 (lines=18) @@ | ||
863 | * @covers ::getDisplayPayer |
|
864 | * @covers ::isBool |
|
865 | */ |
|
866 | public function testSetDisplayPayer() |
|
867 | { |
|
868 | // Test the default value |
|
869 | $this->assertTrue($this->paymentSlip->getDisplayPayer()); |
|
870 | ||
871 | // Disable feature, also check for returned instance |
|
872 | $returned = $this->paymentSlip->setDisplayPayer(false); |
|
873 | $this->assertInstanceOf('SwissPaymentSlip\SwissPaymentSlip\Tests\TestablePaymentSlip', $returned); |
|
874 | $this->assertFalse($this->paymentSlip->getDisplayPayer()); |
|
875 | ||
876 | // Re-enable the feature |
|
877 | $this->paymentSlip->setDisplayPayer(); |
|
878 | $this->assertTrue($this->paymentSlip->getDisplayPayer()); |
|
879 | ||
880 | // Check if the data is disabled |
|
881 | $this->paymentSlip->getPaymentSlipData()->setWithPayer(false); |
|
882 | $this->assertFalse($this->paymentSlip->getDisplayPayer()); |
|
883 | } |
|
884 | ||
885 | /** |
|
886 | * Tests the setDisplayPayer method with an invalid parameter |
@@ 213-230 (lines=18) @@ | ||
210 | * @covers ::getDisplayReferenceNr |
|
211 | * @covers ::isBool |
|
212 | */ |
|
213 | public function testSetDisplayReferenceNr() |
|
214 | { |
|
215 | // Test the default value |
|
216 | $this->assertTrue($this->paymentSlip->getDisplayReferenceNr()); |
|
217 | ||
218 | // Disable the feature, also assert returned instance |
|
219 | $returned = $this->paymentSlip->setDisplayReferenceNr(false); |
|
220 | $this->assertInstanceOf('SwissPaymentSlip\SwissPaymentSlip\OrangePaymentSlip', $returned); |
|
221 | $this->assertFalse($this->paymentSlip->getDisplayReferenceNr()); |
|
222 | ||
223 | // Re-enable the feature |
|
224 | $this->paymentSlip->setDisplayReferenceNr(); |
|
225 | $this->assertTrue($this->paymentSlip->getDisplayReferenceNr()); |
|
226 | ||
227 | // Check if the data is disabled |
|
228 | $this->paymentSlip->getPaymentSlipData()->setWithReferenceNumber(false); |
|
229 | $this->assertFalse($this->paymentSlip->getDisplayReferenceNr()); |
|
230 | } |
|
231 | ||
232 | /** |
|
233 | * Tests the setDisplayReferenceNr method with an invalid parameter |
@@ 191-208 (lines=18) @@ | ||
188 | * @covers ::getDisplayIban |
|
189 | * @covers ::isBool |
|
190 | */ |
|
191 | public function testSetDisplayIban() |
|
192 | { |
|
193 | // Test the default value |
|
194 | $this->assertTrue($this->paymentSlip->getDisplayIban()); |
|
195 | ||
196 | // Disable the feature, also assert returned instance |
|
197 | $returned = $this->paymentSlip->setDisplayIban(false); |
|
198 | $this->assertInstanceOf('SwissPaymentSlip\SwissPaymentSlip\RedPaymentSlip', $returned); |
|
199 | $this->assertFalse($this->paymentSlip->getDisplayIban()); |
|
200 | ||
201 | // Re-enable the feature |
|
202 | $this->paymentSlip->setDisplayIban(); |
|
203 | $this->assertTrue($this->paymentSlip->getDisplayIban()); |
|
204 | ||
205 | // Check if the data is disabled |
|
206 | $this->paymentSlip->getPaymentSlipData()->setWithIban(false); |
|
207 | $this->assertFalse($this->paymentSlip->getDisplayIban()); |
|
208 | } |
|
209 | ||
210 | /** |
|
211 | * Tests the setDisplayIban method with an invalid parameter |
|
@@ 232-249 (lines=18) @@ | ||
229 | * @covers ::getDisplayPaymentReason |
|
230 | * @covers ::isBool |
|
231 | */ |
|
232 | public function testSetDisplayPaymentReason() |
|
233 | { |
|
234 | // Test the default value |
|
235 | $this->assertTrue($this->paymentSlip->getDisplayPaymentReason()); |
|
236 | ||
237 | // Disable the feature, also assert returned instance |
|
238 | $returned = $this->paymentSlip->setDisplayPaymentReason(false); |
|
239 | $this->assertInstanceOf('SwissPaymentSlip\SwissPaymentSlip\RedPaymentSlip', $returned); |
|
240 | $this->assertFalse($this->paymentSlip->getDisplayPaymentReason()); |
|
241 | ||
242 | // Re-enable the feature |
|
243 | $this->paymentSlip->setDisplayPaymentReason(); |
|
244 | $this->assertTrue($this->paymentSlip->getDisplayPaymentReason()); |
|
245 | ||
246 | // Check if the data is disabled |
|
247 | $this->paymentSlip->getPaymentSlipData()->setWithPaymentReason(false); |
|
248 | $this->assertFalse($this->paymentSlip->getDisplayPaymentReason()); |
|
249 | } |
|
250 | ||
251 | /** |
|
252 | * Tests the setDisplayPaymentReason method with an invalid parameter |