MiniprogramTest.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. /*
  21. $response = $this->postJson('/api/channel/paytemplate/update/5',[
  22. 'name'=>'AAAA模板11',
  23. 'status'=>'0',
  24. 'options'=>'[{"price":9,"type":"FIRST_COIN","given":1000,"sequence":1,"is_default":0},{"price":30,"type":"COIN","given":0,"sequence":2,"is_default":1},{"price":50,"type":"COIN","given":4000,"sequence":3,"is_default":1},{"price":190,"type":"MONTH","given":0,"sequence":4,"is_default":1},{"price":290,"type":"YEAR","given":0,"sequence":5,"is_default":0}]'
  25. ]);*/
  26. $response = $this->postJson('/api/channel/paytemplate/updatePayTemplateItem/31',[
  27. 'price'=>10,'type'=>'FIRST_COIN','given'=>1000,'is_default'=>1
  28. ]);
  29. //$response = $this->postJson('/api/channel/paytemplate');
  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/channel/paytemplate/optionSequence');
  45. //$response = $this->getJson('/api/channel/paytemplate/optionSequence');
  46. $response = $this->getJson('/api/manage/miniprogram/companylist');
  47. echo $response->getContent();
  48. $response->dd();
  49. }
  50. }