BankAccountControllerTest.php 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. }
  15. public function testaddCompanyCard()
  16. {
  17. $res = $this->withHeaders([
  18. 'Authorization' => 'Bearer '. $this->token,
  19. ])->json('post','http://localhost/api/jiesuanManage/bankAccount/addCompanyCard', [
  20. 'owner_name' => 'fsdadfasfsaf',
  21. 'name_of_payee' => 'jlkjkljklj',
  22. 'card_no' => '21432515',
  23. 'bank_name' => '中国银行',
  24. 'sub_bank_name' => '第一支行',
  25. 'phone_of_payee' => '143214141',
  26. 'business_id' => 8
  27. ]);
  28. $res->dump();
  29. $res = $this->withHeaders([
  30. 'Authorization' => 'Bearer '. $this->token,
  31. ])->json('post','http://localhost/api/jiesuanManage/bankAccount/addCompanyCard', [
  32. 'id' => 1,
  33. 'owner_name' => 'fsdadfasfsaf2222',
  34. 'name_of_payee' => 'jlkjkljklj3333',
  35. 'card_no' => '2143251544',
  36. 'bank_name' => '中国银行',
  37. 'sub_bank_name' => '第一支行22',
  38. 'phone_of_payee' => '14321414123323232',
  39. 'business_id' => 8
  40. ]);
  41. $res->dump();
  42. }
  43. public function testaddCompanyCard1() {
  44. $res = $this->withHeaders([
  45. 'Authorization' => 'Bearer '. $this->token,
  46. ])->json('post','http://localhost/api/jiesuanManage/bankAccount/addCompanyCard', [
  47. 'id' => 1,
  48. 'owner_name' => 'fasd',
  49. 'name_of_payee' => 'fdsa',
  50. 'card_no' => '2143251544',
  51. 'bank_name' => '中国银行',
  52. 'sub_bank_name' => '第一支行22',
  53. 'phone_of_payee' => '1231',
  54. 'business_id' => 8
  55. ]);
  56. $res->dump();
  57. }
  58. public function testlistShangwu()
  59. {
  60. $res = $this->withHeaders([
  61. 'Authorization' => 'Bearer '. $this->token,
  62. ])->json('get','http://localhost/api/jiesuanManage/bankAccount/listShangwu');
  63. $res->dump();
  64. }
  65. public function testlistBank()
  66. {
  67. $res = $this->withHeaders([
  68. 'Authorization' => 'Bearer '. $this->token,
  69. ])->json('get','http://localhost/api/jiesuanManage/bankAccount/listBank');
  70. $res->dump();
  71. }
  72. public function testlistCompanyCard()
  73. {
  74. $res = $this->withHeaders([
  75. 'Authorization' => 'Bearer '. $this->token,
  76. ])->json('get','http://localhost/api/jiesuanManage/bankAccount/listCompanyCard');
  77. $res->dump();
  78. }
  79. public function testlistAvailableBankCard()
  80. {
  81. $res = $this->withHeaders([
  82. 'Authorization' => 'Bearer '. $this->token,
  83. ])->json('get','http://localhost/api/jiesuanManage/bankAccount/listAvailableBankCard');
  84. $res->dump();
  85. }
  86. }