From 4b34d4e3d1ed55463e5221914927aa8a53ce0617 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Fri, 2 Feb 2018 16:26:06 +1300 Subject: [PATCH] FIX If queuedjobs is not installed, do not create fixtures for it --- tests/WorkflowEmbargoExpiryTest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/WorkflowEmbargoExpiryTest.php b/tests/WorkflowEmbargoExpiryTest.php index 075b7e21..9309eeaf 100644 --- a/tests/WorkflowEmbargoExpiryTest.php +++ b/tests/WorkflowEmbargoExpiryTest.php @@ -29,14 +29,15 @@ class WorkflowEmbargoExpiryTest extends SapphireTest protected function setUp() { - parent::setUp(); - - DBDatetime::set_mock_now('2014-01-05 12:00:00'); - // Prevent failure if queuedjobs module isn't installed. if (!class_exists(AbstractQueuedJob::class)) { + static::$fixture_file = ''; + parent::setUp(); $this->markTestSkipped("This test requires queuedjobs"); } + parent::setUp(); + + DBDatetime::set_mock_now('2014-01-05 12:00:00'); // This doesn't play nicely with PHPUnit Config::modify()->set(QueuedJobService::class, 'use_shutdown_function', false);