JiesuanControllerTest.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace Tests\Jiesuan\Http\Controllers;
  3. use Modules\Jiesuan\Http\Controllers\JiesuanController;
  4. use PHPUnit\Framework\TestCase;
  5. use Tests\UsedTestCase;
  6. class JiesuanControllerTest extends UsedTestCase
  7. {
  8. public function testList()
  9. {
  10. $res = $this->withHeaders([
  11. 'Authorization' => 'Bearer '. $this->token,
  12. ])->json('get','http://localhost/api/jiesuanManage/jiesuan/list');
  13. $this->dumpJson($res);
  14. }
  15. public function testaccountInfo()
  16. {
  17. $res = $this->withHeaders([
  18. 'Authorization' => 'Bearer '. $this->token,
  19. ])->json('get','http://localhost/api/jiesuanManage/jiesuan/accountInfo');
  20. // $res->dump();
  21. $this->dumpJson($res);
  22. }
  23. public function testtixian()
  24. {
  25. $res = $this->withHeaders([
  26. 'Authorization' => 'Bearer '. $this->token,
  27. ])->json('post','http://localhost/api/jiesuanManage/jiesuan/tixian', [
  28. 'bank_card_id' => 1,
  29. 'tixian_money' => 9358,
  30. ]);
  31. $res->dump();
  32. }
  33. public function testlistTixian()
  34. {
  35. $res = $this->withHeaders([
  36. 'Authorization' => 'Bearer '. $this->token,
  37. ])->json('get','http://localhost/api/jiesuanManage/jiesuan/listTixian', [
  38. // 'status' => 5
  39. ]);
  40. $res->dump();
  41. // $this->dumpJson($res);
  42. }
  43. }