Use cleaner way to create custom config everywhere
This commit is contained in:
parent
e4f061e6c3
commit
d2ad962f6f
2 changed files with 20 additions and 16 deletions
|
@ -83,6 +83,17 @@ class FrontControllerTest extends \PHPUnit_Framework_TestCase
|
|||
Config::destroyInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the constructor.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testConstructor()
|
||||
{
|
||||
$controller = new FrontController($this->container);
|
||||
$this->assertInstanceOf(FrontController::class, $controller);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the constructor with streams enabled.
|
||||
*
|
||||
|
@ -325,10 +336,7 @@ class FrontControllerTest extends \PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testRedirectWithM3uStream()
|
||||
{
|
||||
$config = Config::getInstance();
|
||||
$config->stream = true;
|
||||
//We need to create a new controller instance in order to apply the custom config
|
||||
$controller = new FrontController($this->container);
|
||||
$controller = new FrontController($this->container, new Config(['stream'=>true]));
|
||||
$result = $controller->redirect(
|
||||
$this->request->withQueryParams(['url'=>'https://twitter.com/verge/status/813055465324056576/video/1']),
|
||||
$this->response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue