New remux feature (fixes #103)

This commit is contained in:
Pierre Rudloff 2017-04-25 00:40:24 +02:00
parent b80b9c7b2e
commit e6bbe54474
6 changed files with 169 additions and 16 deletions

View file

@ -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.
*