@@ -208,7 +208,8 @@ public function test_successful_ipn() {
208
208
209
209
// Check transaction details were recorded correctly.
210
210
$ ex = $ this ->generate_expected_table_data ($ course , $ user );
211
- $ this ->assertEquals (\tool_paymentplugin \payment_manager::filter_underscores ($ ex ), $ details );
211
+ \tool_paymentplugin \payment_manager::filter_underscores ($ ex );
212
+ $ this ->assertEquals ($ ex , $ details );
212
213
213
214
// Check enrolment happened correctly.
214
215
$ this ->assertEquals ($ user ->id , $ enrolment ->userid );
@@ -250,7 +251,8 @@ public function test_incorrect_currency() {
250
251
$ ex = $ this ->generate_expected_table_data ($ course , $ user );
251
252
$ ex ->success = '0 ' ;
252
253
$ ex ->errorinfo = get_string ('erroripncurrency ' , 'paymentgateway_paypal ' );
253
- $ this ->assertEquals (\tool_paymentplugin \payment_manager::filter_underscores ($ ex ), $ details );
254
+ \tool_paymentplugin \payment_manager::filter_underscores ($ ex );
255
+ $ this ->assertEquals ($ ex , $ details );
254
256
255
257
// Check enrolment failed.
256
258
$ this ->assertEquals (false , $ enrolment );
@@ -290,7 +292,8 @@ public function test_incorrect_cost() {
290
292
$ ex = $ this ->generate_expected_table_data ($ course , $ user );
291
293
$ ex ->success = '0 ' ;
292
294
$ ex ->errorinfo = get_string ('erroripncost ' , 'paymentgateway_paypal ' );
293
- $ this ->assertEquals (\tool_paymentplugin \payment_manager::filter_underscores ($ ex ), $ details );
295
+ \tool_paymentplugin \payment_manager::filter_underscores ($ ex );
296
+ $ this ->assertEquals ($ ex , $ details );
294
297
295
298
// Check enrolment failed.
296
299
$ this ->assertEquals (false , $ enrolment );
@@ -332,7 +335,8 @@ public function test_incorrect_userid() {
332
335
$ ex ->userid = (string ) $ incorrectid ;
333
336
$ ex ->success = '0 ' ;
334
337
$ ex ->errorinfo = get_string ('erroripnuserid ' , 'paymentgateway_paypal ' );
335
- $ this ->assertEquals (\tool_paymentplugin \payment_manager::filter_underscores ($ ex ), $ details );
338
+ \tool_paymentplugin \payment_manager::filter_underscores ($ ex );
339
+ $ this ->assertEquals ($ ex , $ details );
336
340
337
341
// Check enrolment failed.
338
342
$ this ->assertEquals (false , $ enrolment );
@@ -374,7 +378,8 @@ public function test_incorrect_courseid() {
374
378
$ ex ->courseid = (string ) $ incorrectid ;
375
379
$ ex ->success = '0 ' ;
376
380
$ ex ->errorinfo = get_string ('erroripncourseid ' , 'paymentgateway_paypal ' );
377
- $ this ->assertEquals (\tool_paymentplugin \payment_manager::filter_underscores ($ ex ), $ details );
381
+ \tool_paymentplugin \payment_manager::filter_underscores ($ ex );
382
+ $ this ->assertEquals ($ ex , $ details );
378
383
379
384
// Check enrolment failed.
380
385
$ this ->assertEquals (false , $ enrolment );
@@ -420,7 +425,8 @@ public function test_incorrect_multiple() {
420
425
$ ex ->errorinfo = get_string ('erroripncurrency ' , 'paymentgateway_paypal ' ) . " " .
421
426
get_string ('erroripncost ' , 'paymentgateway_paypal ' ) . " " .
422
427
get_string ('erroripnuserid ' , 'paymentgateway_paypal ' );
423
- $ this ->assertEquals (\tool_paymentplugin \payment_manager::filter_underscores ($ ex ), $ details );
428
+ \tool_paymentplugin \payment_manager::filter_underscores ($ ex );
429
+ $ this ->assertEquals ($ ex , $ details );
424
430
425
431
// Check enrolment failed.
426
432
$ this ->assertEquals (false , $ enrolment );
@@ -495,7 +501,8 @@ public function test_pending_ipn() {
495
501
$ ex ->payment_status = 'Pending ' ;
496
502
$ ex ->pending_reason = 'echeck ' ;
497
503
$ ex ->success = '2 ' ;
498
- $ this ->assertEquals (\tool_paymentplugin \payment_manager::filter_underscores ($ ex ), $ details );
504
+ \tool_paymentplugin \payment_manager::filter_underscores ($ ex );
505
+ $ this ->assertEquals ($ ex , $ details );
499
506
500
507
// Check enrolment did not happen.
501
508
$ this ->assertEquals (false , $ enrolment );
@@ -534,7 +541,8 @@ public function test_failed_ipn() {
534
541
$ ex = $ this ->generate_expected_table_data ($ course , $ user );
535
542
$ ex ->payment_status = 'Failed ' ;
536
543
$ ex ->success = '0 ' ;
537
- $ this ->assertEquals (\tool_paymentplugin \payment_manager::filter_underscores ($ ex ), $ details );
544
+ \tool_paymentplugin \payment_manager::filter_underscores ($ ex );
545
+ $ this ->assertEquals ($ ex , $ details );
538
546
539
547
// Check enrolment did not happen.
540
548
$ this ->assertEquals (false , $ enrolment );
0 commit comments