RanseConfigControllerTest.php 838 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Tests\Tuiguang\Http\Controllers;
  3. use Modules\Tuiguang\Http\Controllers\RanseConfigController;
  4. use PHPUnit\Framework\TestCase;
  5. use Tests\UsedTestCase;
  6. class RanseConfigControllerTest extends UsedTestCase
  7. {
  8. public function testGetRanseDuration()
  9. {
  10. $res = $this->withHeaders([
  11. 'Authorization' => 'Bearer '. $this->token,
  12. ])->json('get','http://localhost/api/tuiguang/ranseConfig/getRanseDuration');
  13. $res->dump();
  14. }
  15. public function testsetRanseDuration()
  16. {
  17. $res = $this->withHeaders([
  18. 'Authorization' => 'Bearer '. $this->token,
  19. ])->json('post','http://localhost/api/tuiguang/ranseConfig/setRanseDuration', [
  20. 'charge_user_duration' => 150,
  21. 'no_charge_user_duration' => 50
  22. ]);
  23. $res->dump();
  24. }
  25. }