$this->mockL10nT('Error: iconv PHP module required but not installed.', 1);
$this->mockL10nT('POSIX PHP module', 1);
$this->mockL10nT('Error: POSIX PHP module required but not installed.', 1);
+ $this->mockL10nT('JSON PHP module', 1);
+ $this->mockL10nT('Error: JSON PHP module required but not installed.', 1);
}
private function assertCheckExist($position, $title, $help, $status, $required, $assertionArray)
*/
public function testCheckKeys()
{
+ $this->mockL10nT();
+
$this->setFunctions(['openssl_pkey_new' => false]);
$install = new Installer();
$this->assertFalse($install->checkKeys());
true,
$install->getChecks());
+ $this->mockFunctionL10TCalls();
+ $this->setFunctions(['json_encode' => false]);
+ $install = new Installer();
+ $this->assertFalse($install->checkFunctions());
+ $this->assertCheckExist(9,
+ 'JSON PHP module',
+ 'Error: JSON PHP module required but not installed.',
+ false,
+ true,
+ $install->getChecks());
+
$this->mockFunctionL10TCalls();
$this->setFunctions([
'curl_init' => true,
'openssl_public_encrypt' => true,
'mb_strlen' => true,
'iconv_strlen' => true,
- 'posix_kill' => true
+ 'posix_kill' => true,
+ 'json_encode' => true
]);
$install = new Installer();
$this->assertTrue($install->checkFunctions());
*/
public function testCheckLocalIni()
{
+ $this->mockL10nT();
+
$this->assertTrue($this->root->hasChild('config/local.config.php'));
$install = new Installer();
*/
public function testCheckHtAccessFail()
{
+ $this->mockL10nT();
+
// Mocking the CURL Response
$curlResult = \Mockery::mock('Friendica\Network\CurlResult');
$curlResult
*/
public function testCheckHtAccessWork()
{
+ $this->mockL10nT();
+
// Mocking the failed CURL Response
$curlResultF = \Mockery::mock('Friendica\Network\CurlResult');
$curlResultF
*/
public function testImagick()
{
+ $this->mockL10nT();
+
$imageMock = \Mockery::mock('alias:Friendica\Object\Image');
$imageMock
->shouldReceive('supportedTypes')
*/
public function testImagickNotFound()
{
+ $this->mockL10nT();
+
$imageMock = \Mockery::mock('alias:Friendica\Object\Image');
$imageMock
->shouldReceive('supportedTypes')