123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <?php
- namespace Tests\Jiesuan\Http\Controllers;
- use Modules\Jiesuan\Http\Controllers\BankAccountController;
- use PHPUnit\Framework\TestCase;
- use Tests\UsedTestCase;
- class BankAccountControllerTest extends UsedTestCase
- {
- public function testHezuoInfo()
- {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('get','http://localhost/api/jiesuanManage/bankAccount/hezuoInfo', []);
- // $res->dump();
- $this->dumpJson($res);
- }
- public function testaddCompanyCard()
- {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('post','http://localhost/api/jiesuanManage/bankAccount/addCompanyCard', [
- 'owner_name' => 'fsdadfasfsaf',
- 'name_of_payee' => 'jlkjkljklj',
- 'card_no' => '21432515',
- 'bank_name' => '中国银行',
- 'sub_bank_name' => '第一支行',
- 'phone_of_payee' => '143214141',
- 'business_id' => 8
- ]);
- $res->dump();
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('post','http://localhost/api/jiesuanManage/bankAccount/addCompanyCard', [
- 'id' => 1,
- 'owner_name' => 'fsdadfasfsaf2222',
- 'name_of_payee' => 'jlkjkljklj3333',
- 'card_no' => '2143251544',
- 'bank_name' => '中国银行',
- 'sub_bank_name' => '第一支行22',
- 'phone_of_payee' => '14321414123323232',
- 'business_id' => 8
- ]);
- $res->dump();
- }
- public function testaddCompanyCard1() {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('post','http://localhost/api/jiesuanManage/bankAccount/addCompanyCard', [
- 'id' => 1,
- 'owner_name' => 'fasd',
- 'name_of_payee' => 'fdsa',
- 'card_no' => '2143251544',
- 'bank_name' => '中国银行',
- 'sub_bank_name' => '第一支行22',
- 'phone_of_payee' => '1231',
- 'business_id' => 8
- ]);
- $res->dump();
- }
- public function testlistShangwu()
- {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('get','http://localhost/api/jiesuanManage/bankAccount/listShangwu');
- // $res->dump();
- $this->dumpJson($res);
- }
- public function testlistBank()
- {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('get','http://localhost/api/jiesuanManage/bankAccount/listBank');
- // $res->dump();
- $this->dumpJson($res);
- }
- public function testlistCompanyCard()
- {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('get','http://localhost/api/jiesuanManage/bankAccount/listCompanyCard');
- // $res->dump();
- $this->dumpJson($res);
- }
- public function testlistAvailableBankCard()
- {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('get','http://localhost/api/jiesuanManage/bankAccount/listAvailableBankCard');
- // $res->dump();
- $this->dumpJson($res);
- }
- }
|