File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 22
33namespace Omnipay \SagePay \Message ;
44
5+ use Omnipay \Common \Message \RequestInterface ;
56use Omnipay \Tests \TestCase ;
67
78class ResponseTest extends TestCase
@@ -100,4 +101,25 @@ public function testDirectPurchaseWithToken()
100101 $ this ->assertTrue ($ response ->isSuccessful ());
101102 $ this ->assertSame ('{ABCDEFGH-ABCD-ABCD-ABCD-ABCDEFGHIJKL} ' , $ response ->getToken ());
102103 }
104+
105+
106+ public function testRedirectMethodIsPost ()
107+ {
108+ $ httpResponse = new Response ($ this ->prophesize (RequestInterface::class)->reveal (), []);
109+ $ this ->assertEquals ('POST ' , $ httpResponse ->getRedirectMethod ());
110+ }
111+
112+ public function testDataGetters ()
113+ {
114+ $ vPSTxId = (string ) rand (0 , 100 );
115+ $ securityKey = (string ) rand (0 , 100 );
116+ $ data = [
117+ 'VPSTxId ' => $ vPSTxId ,
118+ 'SecurityKey ' => $ securityKey ,
119+ ];
120+ $ httpResponse = new Response ($ this ->prophesize (RequestInterface::class)->reveal (), $ data );
121+
122+ $ this ->assertEquals ($ vPSTxId , $ httpResponse ->getVPSTxId ());
123+ $ this ->assertEquals ($ securityKey , $ httpResponse ->getSecurityKey ());
124+ }
103125}
You can’t perform that action at this time.
0 commit comments