123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- namespace Tests\Tuiguang\Http\Controllers;
- use Modules\Tuiguang\Http\Controllers\PromotionController;
- use PHPUnit\Framework\TestCase;
- use Tests\UsedTestCase;
- class PromotionControllerTest extends UsedTestCase
- {
- public function testAdd()
- {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('post','http://localhost/api/tuiguang/promotion/add', [
- 'video_id' => 6,
- 'series_sequence' => 4,
- 'name' => 'kkkkddd的发的',
- 'miniprogram_id' => 2,
- 'first_charge_template_id' => 1,
- 'not_first_charge_template_id' => 2
- ]);
- $res->dump();
- }
- public function testDelete()
- {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('post','http://localhost/api/tuiguang/promotion/delete', [
- 'id' => 1
- ]);
- $res->dump();
- }
- public function testupdateSeriesSequence()
- {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('post','http://localhost/api/tuiguang/promotion/updateSeriesSequence', [
- 'id' => 10,
- 'series_sequence' => 6,
- 'remark' => '',
- 'first_charge_template_id' => 1,
- 'not_first_charge_template_id' => 2,
- 'yinliu_enabled' => 1,
- 'yinliu_type' => 1,
- 'yinliu_gzhid' => 8,
- 'yinliu_sequence' => 3
- ]);
- $res->dump();
- }
- public function testList()
- {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('get','http://localhost/api/tuiguang/promotion/list', [
- 'is_config' => 1,
- // 'name' => 'kkk',
- 'id' => 10
- ]);
- $this->dumpJson($res);
- }
- public function testupdateCallbackConfig() {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('post','http://localhost/api/tuiguang/promotion/updateCallbackConfig', [
- 'id' => 2,
- 'callback_type' => 1,
- 'callback_config_id' => 4
- ]);
- $res->dump();
- }
- }
|