Bugfixing AutomaticInstallation test

This commit is contained in:
Philipp Holzer 2019-02-04 00:04:16 +01:00
parent bc73d4bd2b
commit 90e88d6c35
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
9 changed files with 37 additions and 25 deletions

View file

@ -69,7 +69,8 @@ abstract class CacheTest extends MockedTest
protected function setUp()
{
$this->setUpVfsDir();
$this->mockApp($this->root);
$configMock = \Mockery::mock('Friendica\Core\Config\ConfigCache');
$this->mockApp($this->root, $configMock);
$this->app
->shouldReceive('getHostname')
->andReturn('friendica.local');

View file

@ -181,7 +181,7 @@ FIN;
$this->mockConnect(true, 1);
$this->mockConnected(true, 1);
$this->mockExistsTable('user', false, 1);
$this->mockUpdate([false, true, true], null, 1);
$this->mockUpdate([$this->root->url(), false, true, true], null, 1);
$config = <<<CONF
<?php
@ -241,7 +241,7 @@ CONF;
$this->mockConnect(true, 1);
$this->mockConnected(true, 1);
$this->mockExistsTable('user', false, 1);
$this->mockUpdate([false, true, true], null, 1);
$this->mockUpdate([$this->root->url(), false, true, true], null, 1);
$this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
$this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(true), '', 1);
@ -267,7 +267,7 @@ CONF;
$this->mockConnect(true, 1);
$this->mockConnected(true, 1);
$this->mockExistsTable('user', false, 1);
$this->mockUpdate([false, true, true], null, 1);
$this->mockUpdate([$this->root->url(), false, true, true], null, 1);
$this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
$this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(false), '', 1);
@ -292,7 +292,7 @@ CONF;
$this->mockConnect(true, 1);
$this->mockConnected(true, 1);
$this->mockExistsTable('user', false, 1);
$this->mockUpdate([false, true, true], null, 1);
$this->mockUpdate([$this->root->url(), false, true, true], null, 1);
$this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
$this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(true), '', 1);

View file

@ -29,7 +29,8 @@ abstract class ConsoleTest extends MockedTest
Intercept::setUp();
$this->setUpVfsDir();
$this->mockApp($this->root);
$configMock = \Mockery::mock('Friendica\Core\Config\ConfigCache');
$this->mockApp($this->root, $configMock);
}
/**

View file

@ -31,7 +31,8 @@ abstract class LockTest extends MockedTest
// Reusable App object
$this->setUpVfsDir();
$this->mockApp($this->root);
$configMock = \Mockery::mock('Friendica\Core\Config\ConfigCache');
$this->mockApp($this->root, $configMock);
$this->app
->shouldReceive('getHostname')
->andReturn('friendica.local');