documentation
This commit is contained in:
parent
0ccdc2ec0e
commit
70f9d3c596
2 changed files with 22 additions and 0 deletions
|
@ -18,6 +18,13 @@ trait RendererMockTrait
|
||||||
*/
|
*/
|
||||||
private $rendererMock;
|
private $rendererMock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mocking the method 'Renderer::getMarkupTemplate()'
|
||||||
|
*
|
||||||
|
* @param string $templateName The name of the template which should get
|
||||||
|
* @param string $return the return value of the mock (should be defined to have it later for followUp use)
|
||||||
|
* @param null|int $times How often the method will get used
|
||||||
|
*/
|
||||||
public function mockGetMarkupTemplate($templateName, $return = '', $times = null)
|
public function mockGetMarkupTemplate($templateName, $return = '', $times = null)
|
||||||
{
|
{
|
||||||
if (!isset($this->rendererMock)) {
|
if (!isset($this->rendererMock)) {
|
||||||
|
@ -31,6 +38,14 @@ trait RendererMockTrait
|
||||||
->andReturn($return);
|
->andReturn($return);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mocking the method 'Renderer::replaceMacros()'
|
||||||
|
*
|
||||||
|
* @param string $template The template to use (normally, it is the mock result of 'mockGetMarkupTemplate()'
|
||||||
|
* @param array $args The arguments to pass to the macro
|
||||||
|
* @param string $return the return value of the mock
|
||||||
|
* @param null|int $times How often the method will get used
|
||||||
|
*/
|
||||||
public function mockReplaceMacros($template, $args = [], $return = '', $times = null)
|
public function mockReplaceMacros($template, $args = [], $return = '', $times = null)
|
||||||
{
|
{
|
||||||
if (!isset($this->rendererMock)) {
|
if (!isset($this->rendererMock)) {
|
||||||
|
|
|
@ -53,6 +53,13 @@ class AutomaticInstallationConsoleTest extends ConsoleTest
|
||||||
$this->mockConfigGet('config', 'php_path', false);
|
$this->mockConfigGet('config', 'php_path', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the arguments which is asserted to be passed to 'replaceMacros()' for creating the local.ini.php
|
||||||
|
*
|
||||||
|
* @param bool $withDb if true, DB will get saved too
|
||||||
|
*
|
||||||
|
* @return array The arguments to pass to the mock for 'replaceMacros()'
|
||||||
|
*/
|
||||||
private function createArgumentsForMacro($withDb)
|
private function createArgumentsForMacro($withDb)
|
||||||
{
|
{
|
||||||
$args = [
|
$args = [
|
||||||
|
|
Loading…
Reference in a new issue