WechatOpenPlatformControllerTest.php 791 B

1234567891011121314151617181920212223242526272829
  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. DB::table('banks')
  12. ->upsert([
  13. ['name' => '比利时联合银行股份有限公司', 'is_show' => 1, 'code' => 651],
  14. ], ['name'], ['is_show']);
  15. }
  16. public function testauthorCommand()
  17. {
  18. $res = $this->withHeaders([
  19. 'Authorization' => 'Bearer '. $this->token,
  20. ])->json('post','http://localhost/api/channel/openPlatform/authorCommand/wxf313b3506bac2647', [
  21. ]);
  22. $res->dump();
  23. }
  24. }