New remux feature (fixes #103)
This commit is contained in:
parent
b80b9c7b2e
commit
e6bbe54474
6 changed files with 169 additions and 16 deletions
|
@ -361,6 +361,45 @@ class FrontControllerTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertTrue($result->isOk());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the redirect() function with a remuxed video.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testRedirectWithRemux()
|
||||
{
|
||||
$controller = new FrontController($this->container, new Config(['remux'=>true]));
|
||||
$result = $controller->redirect(
|
||||
$this->request->withQueryParams(
|
||||
[
|
||||
'url'=>'https://www.youtube.com/watch?v=M7IpKCZ47pU',
|
||||
'format'=>'bestvideo+bestaudio'
|
||||
]
|
||||
),
|
||||
$this->response
|
||||
);
|
||||
$this->assertTrue($result->isOk());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the redirect() function with a remuxed video but remux disabled.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testRedirectWithRemuxDisabled()
|
||||
{
|
||||
$result = $this->controller->redirect(
|
||||
$this->request->withQueryParams(
|
||||
[
|
||||
'url'=>'https://www.youtube.com/watch?v=M7IpKCZ47pU',
|
||||
'format'=>'bestvideo+bestaudio'
|
||||
]
|
||||
),
|
||||
$this->response
|
||||
);
|
||||
$this->assertTrue($result->isServerError());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the redirect() function with a missing password.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue