File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
tests/Omnipay/Stripe/Message Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,30 @@ public function testStoreFailure()
62
62
$ this ->assertNull ($ response ->getCardReference ());
63
63
$ this ->assertSame ('You must provide an integer value for \'exp_year \'. ' , $ response ->getMessage ());
64
64
}
65
+
66
+ public function testUpdateSuccess ()
67
+ {
68
+ $ httpResponse = $ this ->getMockHttpResponse ('UpdateSuccess.txt ' );
69
+ $ response = new Response ($ this ->getMockRequest (), $ httpResponse ->json ());
70
+
71
+ $ this ->assertTrue ($ response ->isSuccessful ());
72
+ $ this ->assertFalse ($ response ->isRedirect ());
73
+ $ this ->assertNull ($ response ->getTransactionReference ());
74
+ $ this ->assertSame ('cus_1MZSEtqSghKx99 ' , $ response ->getCardReference ());
75
+ $ this ->assertNull ($ response ->getMessage ());
76
+ }
77
+
78
+ public function testUpdateFailure ()
79
+ {
80
+ $ httpResponse = $ this ->getMockHttpResponse ('UpdateFailure.txt ' );
81
+ $ response = new Response ($ this ->getMockRequest (), $ httpResponse ->json ());
82
+
83
+ $ this ->assertFalse ($ response ->isSuccessful ());
84
+ $ this ->assertFalse ($ response ->isRedirect ());
85
+ $ this ->assertNull ($ response ->getTransactionReference ());
86
+ $ this ->assertNull ($ response ->getCardReference ());
87
+ $ this ->assertSame ('No such customer: cus_1MZeNih5LdKxDq ' , $ response ->getMessage ());
88
+ }
65
89
66
90
public function testUnstoreSuccess ()
67
91
{
You can’t perform that action at this time.
0 commit comments