MiniprogramTest.php 1.6 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/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. echo $response->getContent();
  42. $response->dd();
  43. }
  44. }