ClientTest.php 656 B

1234567891011121314151617181920
  1. <?php
  2. namespace Alipay\EasySDK\Test\Base;
  3. use Alipay\EasySDK\Kernel\Factory;
  4. use Alipay\EasySDK\Kernel\Util\ResponseChecker;
  5. use Alipay\EasySDK\Test\TestAccount;
  6. use PHPUnit\Framework\TestCase;
  7. class ClientTest extends TestCase
  8. {
  9. public function testCreate(){
  10. $account = new TestAccount();
  11. $responseChecker = new ResponseChecker();
  12. Factory::setOptions($account->getTestAccount());
  13. $result = Factory::base()->qrcode()->create('https://opendocs.alipay.com','ageIndex=1','文档站点');
  14. $this->assertEquals(true, $responseChecker->success($result));
  15. $this->assertEquals('Success', $result->msg);
  16. }
  17. }