WalletTest.php 704 B

123456789101112131415161718192021222324252627
  1. <?php
  2. use PHPUnit\Framework\TestCase;
  3. class WalletTest extends TestCase
  4. {
  5. public function testLogin()
  6. {
  7. AdaPay\AdaPay::$gateWayType = 'page';
  8. $obj = new AdaPaySdk\Wallet();
  9. $obj_params = array(
  10. # 应用ID
  11. 'app_id'=> 'app_7d87c043-aae3-4357-9b2c-269349a980d6',
  12. # 用户ID
  13. 'member_id'=> 'hf_prod_member_20191013',
  14. # IP
  15. 'ip'=> '192.168.1.152'
  16. );
  17. $obj->login($obj_params);
  18. print("钱包登录".$obj->isError().'=>'.json_encode($obj->result)."\n");
  19. $this->assertEquals('succeeded', $obj->result['status']);
  20. // $this->assertTrue($account->isError());
  21. }
  22. }