File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 33 - 5.2
44 - 5.3
55 - 5.4
6+ before_script :
7+ - export QINIU_ACCESS_KEY="iN7NgwM31j4-BZacMjPrOQBs34UG1maYCAQmhdCV"
8+ - export QINIU_SECRET_KEY="6QTOr2Jg1gcZEWDQXKOGZh5PziC2MCV5KsntT70j"
69script :
710 - cd tests; phpunit .
811
Original file line number Diff line number Diff line change @@ -18,10 +18,15 @@ public function testEncode()
1818
1919 public function testSetKeys ()
2020 {
21- Qiniu_SetKeys ("abc " , "def " );
2221 $ mac = Qiniu_RequireMac (null );
23- $ this ->assertEquals ($ mac ->AccessKey , "abc " );
24- $ this ->assertEquals ($ mac ->SecretKey , "def " );
22+ $ this ->assertTrue (!empty ($ mac ->AccessKey ) && !empty ($ mac ->SecretKey ), 'please provide keys ' );
23+
24+ Qiniu_SetKeys ('abc ' , 'def ' );
25+ $ mac = Qiniu_RequireMac (null );
26+ $ this ->assertEquals ($ mac ->AccessKey , 'abc ' );
27+ $ this ->assertEquals ($ mac ->SecretKey , 'def ' );
28+
29+ Qiniu_SetKeys ($ mac ->AccessKey , $ mac ->SecretKey );
2530 }
2631}
2732
Original file line number Diff line number Diff line change 22
33require_once ("../qiniu/rs.php " );
44
5+ $ accessKey = getenv ("QINIU_ACCESS_KEY " );
6+ $ secretKey = getenv ("QINIU_SECRET_KEY " );
7+
8+ if (!empty ($ accessKey ) && !empty ($ secretKey )) {
9+ Qiniu_SetKeys ($ accessKey , $ secretKey );
10+ }
11+
You can’t perform that action at this time.
0 commit comments