mirror of https://github.com/friendica/friendica
- New Mock for Renderer - No need of prepared assert.ini.php anymore - Mocking Renderer during Autoinstallpull/6061/head
parent
cbc5e12ea8
commit
4f01a198e1
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: philipp
|
||||
* Date: 01.11.18
|
||||
* Time: 10:08
|
||||
*/
|
||||
|
||||
namespace Friendica\Test\Util;
|
||||
|
||||
|
||||
use Mockery\MockInterface;
|
||||
|
||||
trait RendererMockTrait
|
||||
{
|
||||
/**
|
||||
* @var MockInterface The Interface for mocking a renderer
|
||||
*/
|
||||
private $rendererMock;
|
||||
|
||||
public function mockGetMarkupTemplate($templateName, $return = '', $times = null)
|
||||
{
|
||||
if (!isset($this->rendererMock)) {
|
||||
$this->rendererMock = \Mockery::mock('alias:Friendica\Core\Renderer');
|
||||
}
|
||||
|
||||
$this->rendererMock
|
||||
->shouldReceive('getMarkupTemplate')
|
||||
->with($templateName)
|
||||
->times($times)
|
||||
->andReturn($return);
|
||||
}
|
||||
|
||||
public function mockReplaceMacros($template, $args = [], $return = '', $times = null)
|
||||
{
|
||||
if (!isset($this->rendererMock)) {
|
||||
$this->rendererMock = \Mockery::mock('alias:Friendica\Core\Renderer');
|
||||
}
|
||||
|
||||
$this->rendererMock
|
||||
->shouldReceive('replaceMacros')
|
||||
->with($template, $args)
|
||||
->times($times)
|
||||
->andReturn($return);
|
||||
}
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
<?php return <<<INI
|
||||
|
||||
; If you're unsure about what any of the config keys below do, please check the config/defaults.ini.php for detailed
|
||||
; documentation of their data type and behavior.
|
||||
|
||||
[database]
|
||||
hostname = ""
|
||||
username = ""
|
||||
password = ""
|
||||
database = ""
|
||||
charset = utf8mb4
|
||||
|
||||
; ****************************************************************
|
||||
; Some config values below can be overruled from the admin settings
|
||||
; ****************************************************************
|
||||
|
||||
[config]
|
||||
php_path = "/usr/bin/php"
|
||||
|
||||
admin_email = "admin@friendica.local"
|
||||
|
||||
sitename = Friendica Social Network
|
||||
|
||||
register_policy = REGISTER_OPEN
|
||||
register_text =
|
||||
|
||||
max_import_size = 200000
|
||||
|
||||
[system]
|
||||
urlpath = "/friendica"
|
||||
|
||||
default_timezone = "Europe/Berlin"
|
||||
|
||||
language = "de"
|
||||
|
||||
allowed_themes = vier,quattro,duepuntozero,smoothly,frio
|
||||
theme = vier
|
||||
|
||||
allowed_link_protocols[0] = ftp
|
||||
allowed_link_protocols[1] = ftps
|
||||
allowed_link_protocols[2] = mailto
|
||||
allowed_link_protocols[3] = cid
|
||||
allowed_link_protocols[4] = gopher
|
||||
|
||||
maximagesize = 800000
|
||||
|
||||
no_regfullname = true
|
||||
|
||||
block_local_dir = false
|
||||
|
||||
directory = https://dir.friendica.social
|
||||
|
||||
auth_cookie_lifetime = 7
|
||||
|
||||
INI;
|
||||
// Keep this line
|
Loading…
Reference in new issue