1
1
Fork 0

Making tests happy

This commit is contained in:
Michael 2019-11-05 06:51:19 +00:00
parent 8720094b52
commit 695a920d40

View file

@ -200,7 +200,7 @@ class ModeTest extends MockedTest
public function testIsBackendButIndex() public function testIsBackendButIndex()
{ {
$server = []; $server = [];
$module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, true); $module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, [], true);
$mobileDetect = new MobileDetect(); $mobileDetect = new MobileDetect();
$mode = (new Mode())->determineRunMode(false, $module, $server, $mobileDetect); $mode = (new Mode())->determineRunMode(false, $module, $server, $mobileDetect);
@ -214,7 +214,7 @@ class ModeTest extends MockedTest
public function testIsNotBackend() public function testIsNotBackend()
{ {
$server = []; $server = [];
$module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, false); $module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, [], false);
$mobileDetect = new MobileDetect(); $mobileDetect = new MobileDetect();
$mode = (new Mode())->determineRunMode(false, $module, $server, $mobileDetect); $mode = (new Mode())->determineRunMode(false, $module, $server, $mobileDetect);
@ -232,7 +232,7 @@ class ModeTest extends MockedTest
'HTTP_X_REQUESTED_WITH' => 'xmlhttprequest', 'HTTP_X_REQUESTED_WITH' => 'xmlhttprequest',
]; ];
$module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, false); $module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, [], false);
$mobileDetect = new MobileDetect(); $mobileDetect = new MobileDetect();
$mode = (new Mode())->determineRunMode(true, $module, $server, $mobileDetect); $mode = (new Mode())->determineRunMode(true, $module, $server, $mobileDetect);
@ -246,7 +246,7 @@ class ModeTest extends MockedTest
public function testIsNotAjax() public function testIsNotAjax()
{ {
$server = []; $server = [];
$module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, false); $module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, [], false);
$mobileDetect = new MobileDetect(); $mobileDetect = new MobileDetect();
$mode = (new Mode())->determineRunMode(true, $module, $server, $mobileDetect); $mode = (new Mode())->determineRunMode(true, $module, $server, $mobileDetect);
@ -260,7 +260,7 @@ class ModeTest extends MockedTest
public function testIsMobileIsTablet() public function testIsMobileIsTablet()
{ {
$server = []; $server = [];
$module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, false); $module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, [], false);
$mobileDetect = \Mockery::mock(MobileDetect::class); $mobileDetect = \Mockery::mock(MobileDetect::class);
$mobileDetect->shouldReceive('isMobile')->andReturn(true); $mobileDetect->shouldReceive('isMobile')->andReturn(true);
$mobileDetect->shouldReceive('isTablet')->andReturn(true); $mobileDetect->shouldReceive('isTablet')->andReturn(true);
@ -278,7 +278,7 @@ class ModeTest extends MockedTest
public function testIsNotMobileIsNotTablet() public function testIsNotMobileIsNotTablet()
{ {
$server = []; $server = [];
$module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, false); $module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, [], false);
$mobileDetect = \Mockery::mock(MobileDetect::class); $mobileDetect = \Mockery::mock(MobileDetect::class);
$mobileDetect->shouldReceive('isMobile')->andReturn(false); $mobileDetect->shouldReceive('isMobile')->andReturn(false);
$mobileDetect->shouldReceive('isTablet')->andReturn(false); $mobileDetect->shouldReceive('isTablet')->andReturn(false);