1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace Tests\Video\Http\Controllers;
- use Modules\Video\Http\Controllers\EpisodeController;
- use PHPUnit\Framework\TestCase;
- use Tests\UsedTestCase;
- class EpisodeControllerTest extends UsedTestCase
- {
- public function testList()
- {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('get','http://localhost/api/videoStock/episode/downloadList', [
- 'video_id' => 3
- ]);
- $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' => 'url1'],
- ['name' => '02_xxx', 'duration' => 1222, 'key' => 'url2'],
- ['name' => '03_xxx', 'duration' => 3342, 'key' => 'url3'],
- ['name' => '04_xxx', 'duration' => 3342, 'key' => 'url3'],
- ]
- ]);
- // $this->dumpJson($res);
- $res->dump();
- }
- }
|