EpisodeControllerTest.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Tests\Video\Http\Controllers;
  3. use Modules\Video\Http\Controllers\BankAccountController;
  4. use PHPUnit\Framework\TestCase;
  5. use Tests\UsedTestCase;
  6. class EpisodeControllerTest extends UsedTestCase
  7. {
  8. public function testList()
  9. {
  10. $res = $this->withHeaders([
  11. 'Authorization' => 'Bearer '. $this->token,
  12. ])->json('get','http://localhost/api/videoStock/episode/downloadList', [
  13. 'video_id' => 3
  14. ]);
  15. // $this->dumpJson($res);
  16. $res->dump();
  17. }
  18. public function testAdd()
  19. {
  20. $res = $this->withHeaders([
  21. 'Authorization' => 'Bearer '. $this->token,
  22. ])->json('post','http://localhost/api/videoStock/episode/add', [
  23. 'video_id' => 3,
  24. 'videos' => [
  25. ['name' => '01_xxx', 'duration' => 12342, 'key' => 'url1'],
  26. ['name' => '02_xxx', 'duration' => 1222, 'key' => 'url2'],
  27. ['name' => '03_xxx', 'duration' => 3342, 'key' => 'url3'],
  28. ['name' => '04_xxx', 'duration' => 3342, 'key' => 'url3'],
  29. ]
  30. ]);
  31. // $this->dumpJson($res);
  32. $res->dump();
  33. }
  34. }