Install to Module

- Move Install to Module
- Some Bugfixings
This commit is contained in:
Philipp Holzer 2018-10-29 14:10:45 +01:00
parent 933f43218a
commit abb50fbf62
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
4 changed files with 344 additions and 287 deletions

View file

@ -185,8 +185,8 @@ class InstallTest extends TestCase
// Mocking the CURL Response
$curlResult = \Mockery::mock('Friendica\Network\CurlResult');
$curlResult
->shouldReceive('getBody')
->andReturn('not ok');
->shouldReceive('getReturnCode')
->andReturn('404');
$curlResult
->shouldReceive('getRedirectUrl')
->andReturn('');
@ -213,7 +213,7 @@ class InstallTest extends TestCase
$install = new Install();
$this->assertFalse($install->checkHtAccess('https://test', 'https://test'));
$this->assertFalse($install->checkHtAccess('https://test'));
$this->assertSame('test Error', $install->getChecks()[0]['error_msg']['msg']);
}
@ -225,14 +225,14 @@ class InstallTest extends TestCase
// Mocking the failed CURL Response
$curlResultF = \Mockery::mock('Friendica\Network\CurlResult');
$curlResultF
->shouldReceive('getBody')
->andReturn('not ok');
->shouldReceive('getReturnCode')
->andReturn('404');
// Mocking the working CURL Response
$curlResultW = \Mockery::mock('Friendica\Network\CurlResult');
$curlResultW
->shouldReceive('getBody')
->andReturn('ok');
->shouldReceive('getReturnCode')
->andReturn('204');
// Mocking the CURL Request
$networkMock = \Mockery::mock('alias:Friendica\Util\Network');
@ -253,7 +253,7 @@ class InstallTest extends TestCase
$install = new Install();
$this->assertTrue($install->checkHtAccess('https://test', 'https://test'));
$this->assertTrue($install->checkHtAccess('https://test'));
}
/**