aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/controllers_compatibility_test.php
diff options
context:
space:
mode:
authorMáté Bartus <mate.bartus@gmail.com>2016-03-18 22:57:02 +0100
committerMarc Alexander <admin@m-a-styles.de>2019-05-06 21:45:15 +0200
commit7a173877b7244f4ab6a8ff7b6fa0d6450027751b (patch)
tree5f820d58f33a9e972815007dfc79494669d7e702 /tests/functional/controllers_compatibility_test.php
parent41956a8b9050fa6e1e301bfae51d947e6f13c068 (diff)
downloadforums-7a173877b7244f4ab6a8ff7b6fa0d6450027751b.tar
forums-7a173877b7244f4ab6a8ff7b6fa0d6450027751b.tar.gz
forums-7a173877b7244f4ab6a8ff7b6fa0d6450027751b.tar.bz2
forums-7a173877b7244f4ab6a8ff7b6fa0d6450027751b.tar.xz
forums-7a173877b7244f4ab6a8ff7b6fa0d6450027751b.zip
[ticket/14542] Move cron to controller
PHPBB3-14542
Diffstat (limited to 'tests/functional/controllers_compatibility_test.php')
-rw-r--r--tests/functional/controllers_compatibility_test.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/functional/controllers_compatibility_test.php b/tests/functional/controllers_compatibility_test.php
index 9499888a1a..36a34aa7c8 100644
--- a/tests/functional/controllers_compatibility_test.php
+++ b/tests/functional/controllers_compatibility_test.php
@@ -37,6 +37,13 @@ class phpbb_functional_controllers_compatibility_test extends phpbb_functional_t
$this->assert301('feed.php?t=1', 'app.php/feed/topic/1');
}
+ public function test_cron_compatibility()
+ {
+ $this->assert301('cron.php?cron_type=foo', 'app.php/cron/foo');
+ $this->assert301('cron.php?cron_type=foo&bar=foobar', 'app.php/cron/foo?bar=foobar');
+ $this->assert301('cron.php?cron_type=foo&bar=foobar&who=me', 'app.php/cron/foo?bar=foobar&who=me');
+ }
+
protected function assert301($from, $to)
{
self::$client->followRedirects(false);
@@ -44,6 +51,7 @@ class phpbb_functional_controllers_compatibility_test extends phpbb_functional_t
// Fix sid issues
$location = self::$client->getResponse()->getHeader('Location');
+ $location = str_replace('&amp;', '&', $location);
$location = preg_replace('#sid=[^&]+(&(amp;)?)?#', '', $location);
if (substr($location, -1) === '?')
{