@@ -149,27 +149,39 @@ public function testSupportsVoid()
149
149
}
150
150
}
151
151
152
- public function testSupportsStore ()
152
+ public function testSupportsCreateCard ()
153
153
{
154
- $ supportsStore = $ this ->gateway ->supportsStore ();
155
- $ this ->assertInternalType ('boolean ' , $ supportsStore );
154
+ $ supportsCreate = $ this ->gateway ->supportsCreateCard ();
155
+ $ this ->assertInternalType ('boolean ' , $ supportsCreate );
156
156
157
- if ($ supportsStore ) {
158
- $ this ->assertInstanceOf ('Omnipay\Common\Message\RequestInterface ' , $ this ->gateway ->store ());
157
+ if ($ supportsCreate ) {
158
+ $ this ->assertInstanceOf ('Omnipay\Common\Message\RequestInterface ' , $ this ->gateway ->createCard ());
159
159
} else {
160
- $ this ->assertFalse (method_exists ($ this ->gateway , 'store ' ));
160
+ $ this ->assertFalse (method_exists ($ this ->gateway , 'createCard ' ));
161
161
}
162
162
}
163
163
164
- public function testSupportsUnstore ()
164
+ public function testSupportsDeleteCard ()
165
165
{
166
- $ supportsUnstore = $ this ->gateway ->supportsUnstore ();
167
- $ this ->assertInternalType ('boolean ' , $ supportsUnstore );
166
+ $ supportsDelete = $ this ->gateway ->supportsDeleteCard ();
167
+ $ this ->assertInternalType ('boolean ' , $ supportsDelete );
168
168
169
- if ($ supportsUnstore ) {
170
- $ this ->assertInstanceOf ('Omnipay\Common\Message\RequestInterface ' , $ this ->gateway ->unstore ());
169
+ if ($ supportsDelete ) {
170
+ $ this ->assertInstanceOf ('Omnipay\Common\Message\RequestInterface ' , $ this ->gateway ->deleteCard ());
171
171
} else {
172
- $ this ->assertFalse (method_exists ($ this ->gateway , 'unstore ' ));
172
+ $ this ->assertFalse (method_exists ($ this ->gateway , 'deleteCard ' ));
173
+ }
174
+ }
175
+
176
+ public function testSupportsUpdateCard ()
177
+ {
178
+ $ supportsUpdate = $ this ->gateway ->supportsUpdateCard ();
179
+ $ this ->assertInternalType ('boolean ' , $ supportsUpdate );
180
+
181
+ if ($ supportsUpdate ) {
182
+ $ this ->assertInstanceOf ('Omnipay\Common\Message\RequestInterface ' , $ this ->gateway ->updateCard ());
183
+ } else {
184
+ $ this ->assertFalse (method_exists ($ this ->gateway , 'updateCard ' ));
173
185
}
174
186
}
175
187
@@ -290,9 +302,26 @@ public function testVoidParameters()
290
302
}
291
303
}
292
304
293
- public function testStoreParameters ()
305
+ public function testCreateCardParameters ()
306
+ {
307
+ if ($ this ->gateway ->supportsCreateCard ()) {
308
+ foreach ($ this ->gateway ->getDefaultParameters () as $ key => $ default ) {
309
+ // set property on gateway
310
+ $ getter = 'get ' .ucfirst ($ key );
311
+ $ setter = 'set ' .ucfirst ($ key );
312
+ $ value = uniqid ();
313
+ $ this ->gateway ->$ setter ($ value );
314
+
315
+ // request should have matching property, with correct value
316
+ $ request = $ this ->gateway ->createCard ();
317
+ $ this ->assertSame ($ value , $ request ->$ getter ());
318
+ }
319
+ }
320
+ }
321
+
322
+ public function testDeleteCardParameters ()
294
323
{
295
- if ($ this ->gateway ->supportsStore ()) {
324
+ if ($ this ->gateway ->supportsDeleteCard ()) {
296
325
foreach ($ this ->gateway ->getDefaultParameters () as $ key => $ default ) {
297
326
// set property on gateway
298
327
$ getter = 'get ' .ucfirst ($ key );
@@ -301,15 +330,15 @@ public function testStoreParameters()
301
330
$ this ->gateway ->$ setter ($ value );
302
331
303
332
// request should have matching property, with correct value
304
- $ request = $ this ->gateway ->store ();
333
+ $ request = $ this ->gateway ->deleteCard ();
305
334
$ this ->assertSame ($ value , $ request ->$ getter ());
306
335
}
307
336
}
308
337
}
309
338
310
- public function testUnstoreParameters ()
339
+ public function testUpdateCardParameters ()
311
340
{
312
- if ($ this ->gateway ->supportsUnstore ()) {
341
+ if ($ this ->gateway ->supportsUpdateCard ()) {
313
342
foreach ($ this ->gateway ->getDefaultParameters () as $ key => $ default ) {
314
343
// set property on gateway
315
344
$ getter = 'get ' .ucfirst ($ key );
@@ -318,7 +347,7 @@ public function testUnstoreParameters()
318
347
$ this ->gateway ->$ setter ($ value );
319
348
320
349
// request should have matching property, with correct value
321
- $ request = $ this ->gateway ->unstore ();
350
+ $ request = $ this ->gateway ->updateCard ();
322
351
$ this ->assertSame ($ value , $ request ->$ getter ());
323
352
}
324
353
}
0 commit comments