MiniprogramTest.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace Tests\Feature;
  3. use Illuminate\Foundation\Testing\RefreshDatabase;
  4. use Illuminate\Foundation\Testing\WithFaker;
  5. use Tests\TestCase;
  6. class MiniprogramTest extends TestCase
  7. {
  8. /**
  9. * php artisan test --testsuite=Feature
  10. * A basic feature test example.
  11. */
  12. public function ttest_example(): void
  13. {
  14. $response = $this->getJson('/api/manage/miniprogram/allocation/13');
  15. //$response = $this->getJson('/api/manage/miniprogram/index');
  16. echo $response->getContent();
  17. }
  18. public function test_store(): void
  19. {
  20. $response = $this->postJson('/api/manage/miniprogram/update/13',[
  21. 'name'=>'好看看短剧',
  22. 'company'=>'三个三集团',
  23. 'play_name'=>'三个十千短剧',
  24. 'type'=>1,
  25. 'appid'=>'wxts5415641fgtjc43twearhygesrthgysedhgyed',
  26. 'appsecret'=>'2f659djhsjsfa256b5523ta1shqa3d313',
  27. 'status'=>1,
  28. 'remark'=>''
  29. ]);
  30. echo $response->getContent();
  31. $response->dd();
  32. }
  33. public function ttest_allocation(): void
  34. {
  35. $response = $this->postJson('/api/manage/miniprogram/allocation/17',[
  36. 'uids'=>'2,5',
  37. 'action'=>'on'
  38. ]);
  39. $response->dd();
  40. }
  41. public function ttest_index(): void
  42. {
  43. $name = '亿';
  44. $response = $this->getJson('/api/manage/miniprogram/index?name='.$name);
  45. $response->dd();
  46. }
  47. }