123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace Tests\Video\Http\Controllers;
- use Modules\Video\Http\Controllers\BankAccountController;
- use PHPUnit\Framework\TestCase;
- use Tests\UsedTestCase;
- class EpisodeControllerTest extends UsedTestCase
- {
- public function testCreateModule() {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('post','http://localhost/api/module', [
- "title" => "yinliu",
- "path" => "yinliu",
- "keywords" => "yinliu",
- "description" => "引流管理",
- "dirs" => [
- "controllers" => true,
- "models" => true,
- "database" => true,
- "requests" => true,
- ],
- ]);
- $this->dumpJson($res);
- }
- public function testList()
- {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('get','http://localhost/api/videoStock/episode/downloadList', [
- 'video_id' => 3,
- 'need_wechat_status' => 1
- ]);
- $this->dumpJson($res);
- }
- public function testAdd()
- {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('post','http://localhost/api/videoStock/episode/add', [
- 'video_id' => 3,
- 'videos' => [
- ['name' => '01_xxx', 'duration' => 12342, 'key' => 'url1234'],
- ['name' => '02_xxx', 'duration' => 1222, 'key' => 'url244'],
- ['name' => '03_xxx', 'duration' => 3342, 'key' => 'url344'],
- ['name' => '04_xxx', 'duration' => 3342, 'key' => 'url344'],
- ]
- ]);
- // $this->dumpJson($res);
- $res->dump();
- }
- }
|