MiniprogramTest.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 ttest_store(): void
  19. {
  20. $response = $this->postJson('/api/manage/miniprogram/update/13',[
  21. 'name'=>'好看看短剧',
  22. 'company'=>'三个三集团',
  23. 'play_name'=>'三个十千短剧',
  24. 'type'=>1,
  25. 'appid'=>'wxts5415641fgtjhuswsae13',
  26. 'appsecret'=>'2f659djhsjsfa256b5523ta1shqa3d313',
  27. 'status'=>1,
  28. 'remark'=>''
  29. ]);
  30. $response->dd();
  31. }
  32. public function test_allocation(): void
  33. {
  34. $response = $this->postJson('/api/manage/miniprogram/allocation/17',[
  35. 'uids'=>'2,5',
  36. 'action'=>'on'
  37. ]);
  38. $response->dd();
  39. }
  40. public function ttest_index(): void
  41. {
  42. $name = '亿';
  43. $response = $this->getJson('/api/manage/miniprogram/index?name='.$name);
  44. $response->dd();
  45. }
  46. }