BankAccountControllerTest.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. namespace Tests\Jiesuan\Http\Controllers;
  3. use Modules\Jiesuan\Http\Controllers\BankAccountController;
  4. use PHPUnit\Framework\TestCase;
  5. use Tests\UsedTestCase;
  6. class BankAccountControllerTest extends UsedTestCase
  7. {
  8. public function testHezuoInfo()
  9. {
  10. $res = $this->withHeaders([
  11. 'Authorization' => 'Bearer '. $this->token,
  12. ])->json('get','http://localhost/api/jiesuanManage/bankAccount/hezuoInfo', []);
  13. // $res->dump();
  14. $this->dumpJson($res);
  15. }
  16. public function testaddCompanyCard()
  17. {
  18. $res = $this->withHeaders([
  19. 'Authorization' => 'Bearer '. $this->token,
  20. ])->json('post','http://localhost/api/jiesuanManage/bankAccount/addCompanyCard', [
  21. 'owner_name' => 'fsdadfasfsaf',
  22. 'name_of_payee' => 'jlkjkljklj',
  23. 'card_no' => '21432515',
  24. 'bank_name' => '中国银行',
  25. 'sub_bank_name' => '第一支行',
  26. 'phone_of_payee' => '143214141',
  27. 'business_id' => 8
  28. ]);
  29. $res->dump();
  30. $res = $this->withHeaders([
  31. 'Authorization' => 'Bearer '. $this->token,
  32. ])->json('post','http://localhost/api/jiesuanManage/bankAccount/addCompanyCard', [
  33. 'id' => 1,
  34. 'owner_name' => 'fsdadfasfsaf2222',
  35. 'name_of_payee' => 'jlkjkljklj3333',
  36. 'card_no' => '2143251544',
  37. 'bank_name' => '中国银行',
  38. 'sub_bank_name' => '第一支行22',
  39. 'phone_of_payee' => '14321414123323232',
  40. 'business_id' => 8
  41. ]);
  42. $res->dump();
  43. }
  44. public function testaddCompanyCard1() {
  45. $res = $this->withHeaders([
  46. 'Authorization' => 'Bearer '. $this->token,
  47. ])->json('post','http://localhost/api/jiesuanManage/bankAccount/addCompanyCard', [
  48. 'id' => 1,
  49. 'owner_name' => 'fasd',
  50. 'name_of_payee' => 'fdsa',
  51. 'card_no' => '2143251544',
  52. 'bank_name' => '中国银行',
  53. 'sub_bank_name' => '第一支行22',
  54. 'phone_of_payee' => '1231',
  55. 'business_id' => 8
  56. ]);
  57. $res->dump();
  58. }
  59. public function testlistShangwu()
  60. {
  61. $res = $this->withHeaders([
  62. 'Authorization' => 'Bearer '. $this->token,
  63. ])->json('get','http://localhost/api/jiesuanManage/bankAccount/listShangwu');
  64. // $res->dump();
  65. $this->dumpJson($res);
  66. }
  67. public function testlistBank()
  68. {
  69. $res = $this->withHeaders([
  70. 'Authorization' => 'Bearer '. $this->token,
  71. ])->json('get','http://localhost/api/jiesuanManage/bankAccount/listBank');
  72. // $res->dump();
  73. $this->dumpJson($res);
  74. }
  75. public function testlistCompanyCard()
  76. {
  77. $res = $this->withHeaders([
  78. 'Authorization' => 'Bearer '. $this->token,
  79. ])->json('get','http://localhost/api/jiesuanManage/bankAccount/listCompanyCard');
  80. // $res->dump();
  81. $this->dumpJson($res);
  82. }
  83. public function testlistAvailableBankCard()
  84. {
  85. $res = $this->withHeaders([
  86. 'Authorization' => 'Bearer '. $this->token,
  87. ])->json('get','http://localhost/api/jiesuanManage/bankAccount/listAvailableBankCard');
  88. // $res->dump();
  89. $this->dumpJson($res);
  90. }
  91. }