File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 2929 ]
3030 },
3131 "require" : {
32- "omnipay/common" : " v3.0-beta.1 " ,
32+ "omnipay/common" : " ^3.0 " ,
3333 "php-http/guzzle6-adapter" : " *"
3434 },
3535 "require-dev" : {
36- "omnipay/tests" : " v3.0-beta.1 " ,
36+ "omnipay/tests" : " ^3.0 " ,
3737 "squizlabs/php_codesniffer" : " 3.*"
3838 }
3939}
Original file line number Diff line number Diff line change 33namespace Omnipay \Alipay \Tests \Common ;
44
55use Omnipay \Alipay \Common \Signer ;
6+ use PHPUnit \Framework \TestCase ;
67
7- class SignerTest extends \PHPUnit_Framework_TestCase
8+ class SignerTest extends TestCase
89{
910 protected $ params ;
1011
@@ -134,19 +135,23 @@ public function testGetContentToSign()
134135 $ this ->assertEquals ('aaa=111&bbb=2222&ccc=3333&s="." ' , $ content );
135136 }
136137
138+
137139 public function testConvert ()
138140 {
139141 $ key = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB ' ;
140142
141143 $ signer = new Signer ();
142- $ key = $ signer ->convertKey ($ key , Signer::KEY_TYPE_PUBLIC );
144+ $ key = $ signer ->convertKey ($ key , Signer::KEY_TYPE_PUBLIC );
143145
144- $ this ->assertEquals ('-----BEGIN PUBLIC KEY-----
146+ $ this ->assertEquals (
147+ '-----BEGIN PUBLIC KEY-----
145148MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRA
146149FljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQE
147150B/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5Ksi
148151NG9zpgmLCUYuLkxpLQIDAQAB
149- -----END PUBLIC KEY----- ' , $ key );
152+ -----END PUBLIC KEY----- ' ,
153+ $ key
154+ );
150155 }
151156
152157
You can’t perform that action at this time.
0 commit comments