aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cron/task/testmod
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-01-13 00:51:32 +0100
committerOleg Pudeyev <oleg@bsdpower.com>2011-02-12 22:05:54 -0500
commit09b136272b9ec25824f1c72d0148bdfe43a43603 (patch)
treeaaadafee6c7a7dd2b0d70c7b774349561fc0fd93 /tests/cron/task/testmod
parent7a8233020bdeb872dad6057b7799c43c1543aba4 (diff)
downloadforums-09b136272b9ec25824f1c72d0148bdfe43a43603.tar
forums-09b136272b9ec25824f1c72d0148bdfe43a43603.tar.gz
forums-09b136272b9ec25824f1c72d0148bdfe43a43603.tar.bz2
forums-09b136272b9ec25824f1c72d0148bdfe43a43603.tar.xz
forums-09b136272b9ec25824f1c72d0148bdfe43a43603.zip
[feature/system-cron] Cache cron's task names.
Instead of using a path relative to phpbb_root_path the path to the task directory is directly passed to the cron manager. Dummy tasks are now in the tests directory directly. PHPBB3-9596
Diffstat (limited to 'tests/cron/task/testmod')
-rw-r--r--tests/cron/task/testmod/dummy_task.php23
-rw-r--r--tests/cron/task/testmod/second_dummy_task.php23
2 files changed, 46 insertions, 0 deletions
diff --git a/tests/cron/task/testmod/dummy_task.php b/tests/cron/task/testmod/dummy_task.php
new file mode 100644
index 0000000000..5941157589
--- /dev/null
+++ b/tests/cron/task/testmod/dummy_task.php
@@ -0,0 +1,23 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+class phpbb_cron_task_testmod_dummy_task extends phpbb_cron_task_base
+{
+ public static $was_run = 0;
+
+ public function run()
+ {
+ self::$was_run++;
+ }
+
+ public function should_run()
+ {
+ return true;
+ }
+}
diff --git a/tests/cron/task/testmod/second_dummy_task.php b/tests/cron/task/testmod/second_dummy_task.php
new file mode 100644
index 0000000000..7118b2ebe7
--- /dev/null
+++ b/tests/cron/task/testmod/second_dummy_task.php
@@ -0,0 +1,23 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+class phpbb_cron_task_testmod_second_dummy_task extends phpbb_cron_task_base
+{
+ public static $was_run = 0;
+
+ public function run()
+ {
+ self::$was_run++;
+ }
+
+ public function should_run()
+ {
+ return true;
+ }
+}