More test coverage
Run youtube-dl with --restrict-filenames in order to avoid issues when testing against different locales
This commit is contained in:
parent
419110f764
commit
0a66dce2b8
7 changed files with 190 additions and 29 deletions
|
@ -7,6 +7,8 @@ namespace Alltube\Test;
|
|||
|
||||
use Alltube\ViewFactory;
|
||||
use Slim\Container;
|
||||
use Slim\Http\Environment;
|
||||
use Slim\Http\Request;
|
||||
use Slim\Views\Smarty;
|
||||
|
||||
/**
|
||||
|
@ -24,4 +26,17 @@ class ViewFactoryTest extends \PHPUnit_Framework_TestCase
|
|||
$view = ViewFactory::create(new Container());
|
||||
$this->assertInstanceOf(Smarty::class, $view);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test the create() function with a X-Forwarded-Proto header.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testCreateWithXForwardedProto()
|
||||
{
|
||||
$request = Request::createFromEnvironment(Environment::mock());
|
||||
$view = ViewFactory::create(new Container(), $request->withHeader('X-Forwarded-Proto', 'https'));
|
||||
$this->assertInstanceOf(Smarty::class, $view);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue