@@ -14,7 +14,7 @@ class Payment_Gateway_Payment_Token extends Test_Case {
14
14
15
15
16
16
/**
17
- * Tests for \SV_WC_Payment_Gateway_Helper ::__construct()
17
+ * Tests for \SV_WC_Payment_Gateway_Payment_Token ::__construct()
18
18
*
19
19
* Simply tests that the token ID and data are set.
20
20
*
@@ -34,7 +34,7 @@ public function test__construct() {
34
34
35
35
36
36
/**
37
- * Tests for \SV_WC_Payment_Gateway_Helper ::__construct()
37
+ * Tests for \SV_WC_Payment_Gateway_Payment_Token ::__construct()
38
38
*
39
39
* Tests that the card type is correctly set in all situations.
40
40
*
@@ -68,9 +68,9 @@ public function provider_test__construct_set_card_type() {
68
68
69
69
70
70
/**
71
- * Tests \SV_WC_Payment_Gateway_Helper ::set_default()
71
+ * Tests \SV_WC_Payment_Gateway_Payment_Token ::set_default()
72
72
*
73
- * Also provides coverage for \SV_WC_Payment_Gateway_Helper ::is_default()
73
+ * Also provides coverage for \SV_WC_Payment_Gateway_Payment_Token ::is_default()
74
74
*
75
75
* @since 4.5.0
76
76
*/
@@ -87,7 +87,7 @@ public function test_set_default() {
87
87
88
88
89
89
/**
90
- * Tests true for \SV_WC_Payment_Gateway_Helper ::is_credit_card()
90
+ * Tests true for \SV_WC_Payment_Gateway_Payment_Token ::is_credit_card()
91
91
*
92
92
* @since 4.5.0
93
93
*/
@@ -102,7 +102,7 @@ public function test_is_credit_card_true() {
102
102
103
103
104
104
/**
105
- * Tests false for \SV_WC_Payment_Gateway_Helper ::is_credit_card()
105
+ * Tests false for \SV_WC_Payment_Gateway_Payment_Token ::is_credit_card()
106
106
*
107
107
* @since 4.5.0
108
108
*/
@@ -117,7 +117,7 @@ public function test_is_credit_card_false() {
117
117
118
118
119
119
/**
120
- * Tests true for \SV_WC_Payment_Gateway_Helper ::is_echeck()
120
+ * Tests true for \SV_WC_Payment_Gateway_Payment_Token ::is_echeck()
121
121
*
122
122
* @since 4.5.0
123
123
*/
@@ -132,7 +132,7 @@ public function test_is_echeck_true() {
132
132
133
133
134
134
/**
135
- * Tests false for \SV_WC_Payment_Gateway_Helper ::is_check()
135
+ * Tests false for \SV_WC_Payment_Gateway_Payment_Token ::is_check()
136
136
*
137
137
* @since 4.5.0
138
138
*/
@@ -147,9 +147,9 @@ public function test_is_echeck_false() {
147
147
148
148
149
149
/**
150
- * Tests \SV_WC_Payment_Gateway_Helper ::set_card_type()
150
+ * Tests \SV_WC_Payment_Gateway_Payment_Token ::set_card_type()
151
151
*
152
- * Also provides coverage for \SV_WC_Payment_Gateway_Helper ::get_account_type()
152
+ * Also provides coverage for \SV_WC_Payment_Gateway_Payment_Token ::get_account_type()
153
153
*
154
154
* @since 4.5.0
155
155
*/
@@ -166,9 +166,9 @@ public function test_set_card_type() {
166
166
167
167
168
168
/**
169
- * Tests \SV_WC_Payment_Gateway_Helper ::set_account_type()
169
+ * Tests \SV_WC_Payment_Gateway_Payment_Token ::set_account_type()
170
170
*
171
- * Also provides coverage for \SV_WC_Payment_Gateway_Helper ::get_account_type()
171
+ * Also provides coverage for \SV_WC_Payment_Gateway_Payment_Token ::get_account_type()
172
172
*
173
173
* @since 4.5.0
174
174
*/
@@ -185,7 +185,7 @@ public function test_set_account_type() {
185
185
186
186
187
187
/**
188
- * Tests for \SV_WC_Payment_Gateway_Helper ::get_type_full()
188
+ * Tests for \SV_WC_Payment_Gateway_Payment_Token ::get_type_full()
189
189
*
190
190
* @since 4.5.0
191
191
* @dataProvider provider_test_get_type_full
@@ -221,9 +221,9 @@ public function provider_test_get_type_full() {
221
221
222
222
223
223
/**
224
- * Tests \SV_WC_Payment_Gateway_Helper ::set_last_four()
224
+ * Tests \SV_WC_Payment_Gateway_Payment_Token ::set_last_four()
225
225
*
226
- * Also provides coverage for \SV_WC_Payment_Gateway_Helper ::get_last_four()
226
+ * Also provides coverage for \SV_WC_Payment_Gateway_Payment_Token ::get_last_four()
227
227
*
228
228
* @since 4.5.0
229
229
*/
@@ -240,9 +240,9 @@ public function test_set_last_four() {
240
240
241
241
242
242
/**
243
- * Tests \SV_WC_Payment_Gateway_Helper ::set_exp_month()
243
+ * Tests \SV_WC_Payment_Gateway_Payment_Token ::set_exp_month()
244
244
*
245
- * Also provides coverage for \SV_WC_Payment_Gateway_Helper ::get_exp_month()
245
+ * Also provides coverage for \SV_WC_Payment_Gateway_Payment_Token ::get_exp_month()
246
246
*
247
247
* @since 4.5.0
248
248
*/
@@ -259,9 +259,9 @@ public function test_set_exp_month() {
259
259
260
260
261
261
/**
262
- * Tests \SV_WC_Payment_Gateway_Helper ::set_exp_year()
262
+ * Tests \SV_WC_Payment_Gateway_Payment_Token ::set_exp_year()
263
263
*
264
- * Also provides coverage for \SV_WC_Payment_Gateway_Helper ::get_exp_year()
264
+ * Also provides coverage for \SV_WC_Payment_Gateway_Payment_Token ::get_exp_year()
265
265
*
266
266
* @since 4.5.0
267
267
*/
@@ -278,7 +278,7 @@ public function test_set_exp_year() {
278
278
279
279
280
280
/**
281
- * Tests \SV_WC_Payment_Gateway_Helper ::get_exp_date()
281
+ * Tests \SV_WC_Payment_Gateway_Payment_Token ::get_exp_date()
282
282
*
283
283
* @since 4.5.0
284
284
*/
@@ -294,9 +294,9 @@ public function test_get_exp_date() {
294
294
295
295
296
296
/**
297
- * Tests \SV_WC_Payment_Gateway_Helper ::set_image_url()
297
+ * Tests \SV_WC_Payment_Gateway_Payment_Token ::set_image_url()
298
298
*
299
- * Also provides coverage for \SV_WC_Payment_Gateway_Helper ::get_image_url()
299
+ * Also provides coverage for \SV_WC_Payment_Gateway_Payment_Token ::get_image_url()
300
300
*
301
301
* @since 4.5.0
302
302
*/
@@ -309,5 +309,21 @@ public function test_set_image_url() {
309
309
$ this ->assertEquals ( 'http://example.com/1234.jpg ' , $ token ->get_image_url () );
310
310
}
311
311
312
+ /**
313
+ * Tests \SV_WC_Payment_Gateway_Payment_Token::set_nickname()
314
+ *
315
+ * Also provides coverage for \SV_WC_Payment_Gateway_Payment_Token::get_nickname()
316
+ *
317
+ * @since 5.2.1
318
+ */
319
+ public function test_set_nickname () {
320
+
321
+ $ token = new PluginFramework \SV_WC_Payment_Gateway_Payment_Token ( 'mock-token ' , array () );
322
+
323
+ $ token ->set_nickname ( 'new-payment-method ' );
324
+
325
+ $ this ->assertEquals ( 'new-payment-method ' , $ token ->get_nickname () );
326
+ }
327
+
312
328
313
329
}
0 commit comments