MiniprogramTest.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 test_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/13',[
  35. 'uids'=>'5,6,7'
  36. ]);
  37. $response->dd();
  38. }
  39. public function ttest_index(): void
  40. {
  41. $name = '亿';
  42. $response = $this->getJson('/api/manage/miniprogram/index?name='.$name);
  43. $response->dd();
  44. }
  45. }