MiniprogramTest.php 1.7 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 ttest_store(): void
  19. {
  20. $response = $this->postJson('/api/channel/paytemplate/update/5',[
  21. 'name'=>'AAAA模板11',
  22. 'status'=>'0',
  23. '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}]'
  24. ]);
  25. //$response = $this->postJson('/api/channel/paytemplate');
  26. echo $response->getContent();
  27. $response->dd();
  28. }
  29. public function ttest_allocation(): void
  30. {
  31. $response = $this->postJson('/api/manage/miniprogram/allocation/17',[
  32. 'uids'=>'2,5',
  33. 'action'=>'on'
  34. ]);
  35. $response->dd();
  36. }
  37. public function test_index(): void
  38. {
  39. $name = '亿';
  40. //$response = $this->getJson('/api/channel/paytemplate/show/5');
  41. $response = $this->getJson('/api/channel/paytemplate/optionSequence');
  42. echo $response->getContent();
  43. $response->dd();
  44. }
  45. }