File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,13 @@ public function testCustomBrandWorks()
127
127
$ this ->assertEquals ('omniexpress ' , $ this ->card ->getBrand ());
128
128
}
129
129
130
+ public function testCustomBrandAddedTwiceReturnsFalse ()
131
+ {
132
+ $ this ->assertTrue ($ this ->card ->addSupportedBrand ('omniexpress ' , '/^9\d{12}(\d{3})?$/ ' ));
133
+ $ this ->assertArrayHasKey ('omniexpress ' , $ this ->card ->getSupportedBrands ());
134
+ $ this ->assertFalse ($ this ->card ->addSupportedBrand ('omniexpress ' , '/^9\d{12}(\d{3})?$/ ' ));
135
+ }
136
+
130
137
public function testTitle ()
131
138
{
132
139
$ this ->card ->setTitle ('Mr. ' );
Original file line number Diff line number Diff line change @@ -90,6 +90,12 @@ public function testGetRedirectResponseInvalidMethod()
90
90
91
91
$ this ->response ->getRedirectResponse ();
92
92
}
93
+
94
+ public function testGetTransactionIdNull ()
95
+ {
96
+ $ this ->response = m::mock ('\Omnipay\Common\Message\AbstractResponseTest_MockRedirectResponse ' )->makePartial ();
97
+ $ this ->assertNull ($ this ->response ->getTransactionId ());
98
+ }
93
99
}
94
100
95
101
class AbstractResponseTest_MockRedirectResponse extends AbstractResponse implements RedirectResponseInterface
You can’t perform that action at this time.
0 commit comments