From dccbd573e8010a30f0876c03f0e7150e2a377938 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 27 Oct 2014 18:55:37 -0700 Subject: [PATCH] [ticket/13232] Ensure prune cron job always gets run in prune test The cron scheduler might pick a different task but we don't want to go through them all to find the one we need. So we just make sure cron is run at all and then manually run the one we want. PHPBB3-13232 --- tests/functional/prune_shadow_topic_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/functional/prune_shadow_topic_test.php b/tests/functional/prune_shadow_topic_test.php index 84f07e9802..fc5aab54a4 100644 --- a/tests/functional/prune_shadow_topic_test.php +++ b/tests/functional/prune_shadow_topic_test.php @@ -129,8 +129,8 @@ class phpbb_functional_prune_shadow_topic_test extends phpbb_functional_test_cas $result = $this->db->sql_query($sql); $crawler = self::request('GET', "viewforum.php?f={$this->data['forums']['Prune Shadow']}&sid={$this->sid}"); - $cron_link = $crawler->filter('img')->last()->attr('src'); - $crawler = self::request('GET', $cron_link . "&sid={$this->sid}", array(), false); + $this->assertNotEmpty($crawler->filter('img')->last()->attr('src')); + self::request('GET', "cron.php?cron_type=cron.task.core.prune_shadow_topics&f={$this->data['forums']['Prune Shadow']}&sid={$this->sid}", array(), false); $this->assert_forum_details($this->data['forums']['Prune Shadow'], array( 'forum_posts_approved' => 0,