diff options
Diffstat (limited to 'tests/console/cron/tasks')
-rw-r--r-- | tests/console/cron/tasks/simple.php | 27 | ||||
-rw-r--r-- | tests/console/cron/tasks/simple_not_ready.php | 13 | ||||
-rw-r--r-- | tests/console/cron/tasks/simple_ready.php | 8 |
3 files changed, 48 insertions, 0 deletions
diff --git a/tests/console/cron/tasks/simple.php b/tests/console/cron/tasks/simple.php new file mode 100644 index 0000000000..194c52afe1 --- /dev/null +++ b/tests/console/cron/tasks/simple.php @@ -0,0 +1,27 @@ +<?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 phpbb_cron_task_simple extends \phpbb\cron\task\base +{ + public $executed = false; + + public function get_name() + { + return get_class($this); + } + + public function run() + { + $this->executed = true; + } +} diff --git a/tests/console/cron/tasks/simple_not_ready.php b/tests/console/cron/tasks/simple_not_ready.php new file mode 100644 index 0000000000..887768e5fe --- /dev/null +++ b/tests/console/cron/tasks/simple_not_ready.php @@ -0,0 +1,13 @@ +<?php + +class phpbb_cron_task_simple_not_ready extends \phpbb\cron\task\base +{ + public function run() + { + } + + public function should_run() + { + return false; + } +} diff --git a/tests/console/cron/tasks/simple_ready.php b/tests/console/cron/tasks/simple_ready.php new file mode 100644 index 0000000000..47970e104f --- /dev/null +++ b/tests/console/cron/tasks/simple_ready.php @@ -0,0 +1,8 @@ +<?php + +class phpbb_cron_task_simple_ready extends \phpbb\cron\task\base +{ + public function run() + { + } +} |