123456789101112131415161718192021222324252627282930313233343536 |
- <?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/list', [
- 'video_id' => 1
- ]);
- $this->dumpJson($res);
- }
- public function testAdd()
- {
- $res = $this->withHeaders([
- 'Authorization' => 'Bearer '. $this->token,
- ])->json('post','http://localhost/api/videoStock/episode/add', [
- 'video_id' => 2,
- 'videos' => [
- ['name' => '01_xxx', 'duration' => 12342, 'url' => 'url1'],
- ['name' => '02_xxx', 'duration' => 1222, 'url' => 'url2'],
- ['name' => '03_xxx', 'duration' => 3342, 'url' => 'url3'],
- ]
- ]);
- $this->dumpJson($res);
- }
- }
|