TEST Fix regression in tests from new Versioned exceptions

This commit is contained in:
Daniel Hensby 2018-06-19 14:39:17 +01:00
parent d392ca72f1
commit 3b14436304
No known key found for this signature in database
GPG Key ID: D8DEBC4C8E7BC8B9

View File

@ -53,7 +53,9 @@ class BlogArchiveWidgetTest extends SapphireTest
array('Title' => 'August 2017'), array('Title' => 'August 2017'),
), $archive); ), $archive);
Versioned::reading_stage($original); if ($original) {
Versioned::reading_stage($original);
}
} }
public function testArchiveYearly() public function testArchiveYearly()
@ -91,6 +93,8 @@ class BlogArchiveWidgetTest extends SapphireTest
$this->assertCount(4, $archive, 'Four months are shown in the blog archive list after new post added'); $this->assertCount(4, $archive, 'Four months are shown in the blog archive list after new post added');
Versioned::reading_stage($original); if ($original) {
Versioned::reading_stage($original);
}
} }
} }