mirror of
https://github.com/friendica/friendica
synced 2024-11-10 04:22:54 +00:00
Making tests happy
This commit is contained in:
parent
8720094b52
commit
695a920d40
1 changed files with 6 additions and 6 deletions
|
@ -200,7 +200,7 @@ class ModeTest extends MockedTest
|
|||
public function testIsBackendButIndex()
|
||||
{
|
||||
$server = [];
|
||||
$module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, true);
|
||||
$module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, [], true);
|
||||
$mobileDetect = new MobileDetect();
|
||||
|
||||
$mode = (new Mode())->determineRunMode(false, $module, $server, $mobileDetect);
|
||||
|
@ -214,7 +214,7 @@ class ModeTest extends MockedTest
|
|||
public function testIsNotBackend()
|
||||
{
|
||||
$server = [];
|
||||
$module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, false);
|
||||
$module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, [], false);
|
||||
$mobileDetect = new MobileDetect();
|
||||
|
||||
$mode = (new Mode())->determineRunMode(false, $module, $server, $mobileDetect);
|
||||
|
@ -232,7 +232,7 @@ class ModeTest extends MockedTest
|
|||
'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();
|
||||
|
||||
$mode = (new Mode())->determineRunMode(true, $module, $server, $mobileDetect);
|
||||
|
@ -246,7 +246,7 @@ class ModeTest extends MockedTest
|
|||
public function testIsNotAjax()
|
||||
{
|
||||
$server = [];
|
||||
$module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, false);
|
||||
$module = new Module(Module::DEFAULT, Module::DEFAULT_CLASS, [], false);
|
||||
$mobileDetect = new MobileDetect();
|
||||
|
||||
$mode = (new Mode())->determineRunMode(true, $module, $server, $mobileDetect);
|
||||
|
@ -260,7 +260,7 @@ class ModeTest extends MockedTest
|
|||
public function testIsMobileIsTablet()
|
||||
{
|
||||
$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->shouldReceive('isMobile')->andReturn(true);
|
||||
$mobileDetect->shouldReceive('isTablet')->andReturn(true);
|
||||
|
@ -278,7 +278,7 @@ class ModeTest extends MockedTest
|
|||
public function testIsNotMobileIsNotTablet()
|
||||
{
|
||||
$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->shouldReceive('isMobile')->andReturn(false);
|
||||
$mobileDetect->shouldReceive('isTablet')->andReturn(false);
|
||||
|
|
Loading…
Reference in a new issue