WechatOpenPlatformControllerTest.php 883 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Tests\Channel\Http\Controllers;
  3. use Illuminate\Support\Facades\DB;
  4. use Modules\Channel\Http\Controllers\WechatOpenPlatformController;
  5. use PHPUnit\Framework\TestCase;
  6. use Tests\UsedTestCase;
  7. class WechatOpenPlatformControllerTest extends UsedTestCase
  8. {
  9. public function testAuth()
  10. {
  11. $res = $this->withHeaders([
  12. ])->json('get','http://localhost/api/channel/openPlatform/auth/wxf313b3506bac2647/26?auth_code=queryauthcode@@@K_MNMi2oLcnszHdG1o5R9rSYcrxFrBmTwtug04MDjk2PrjEfl1mVjYSfPSgJzodUyIvOKXnVaTtz-oLPUw10Ng&expires_in=3600');
  13. $res->dump();
  14. }
  15. public function testauthorCommand()
  16. {
  17. $res = $this->withHeaders([
  18. 'Authorization' => 'Bearer '. $this->token,
  19. ])->json('post','http://localhost/api/channel/openPlatform/authorCommand/wxf313b3506bac2647', [
  20. ]);
  21. $res->dump();
  22. }
  23. }