mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/13740] Module base test
PHPBB3-13740
This commit is contained in:
20
tests/installer/mocks/test_installer_module.php
Normal file
20
tests/installer/mocks/test_installer_module.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
class test_installer_module extends \phpbb\install\module_base
|
||||
{
|
||||
public function get_navigation_stage_path()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
}
|
44
tests/installer/mocks/test_installer_task_mock.php
Normal file
44
tests/installer/mocks/test_installer_task_mock.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
class test_installer_task_mock extends \phpbb\install\task_base
|
||||
{
|
||||
private $task_was_runned;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->task_was_runned = false;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function run()
|
||||
{
|
||||
$this->task_was_runned = true;
|
||||
}
|
||||
|
||||
public function was_task_runned()
|
||||
{
|
||||
return $this->task_was_runned;
|
||||
}
|
||||
|
||||
public function get_task_lang_name()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public static function get_step_count()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user