ClientTest.php 517 B

1234567891011121314151617181920
  1. <?php
  2. namespace Alipay\EasySDK\Test\security\textrisk;
  3. use Alipay\EasySDK\Kernel\Factory;
  4. use Alipay\EasySDK\Test\TestAccount;
  5. use PHPUnit\Framework\TestCase;
  6. class ClientTest extends TestCase
  7. {
  8. public function testDetectContent(){
  9. $account = new TestAccount();
  10. Factory::setOptions($account->getTestAccount());
  11. $result = Factory::security()->textRisk()->detect("test");
  12. $this->assertEquals('10000', $result->code);
  13. $this->assertEquals('Success', $result->msg);
  14. }
  15. }