Skip to content

Commit

Permalink
FIX If queuedjobs is not installed, do not create fixtures for it
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill committed Feb 2, 2018
1 parent 311eb70 commit 4b34d4e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/WorkflowEmbargoExpiryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4b34d4e

Please sign in to comment.