FIX Ensure that version feeds are enabled by default in tests

This commit is contained in:
Robbie Averill 2017-05-12 10:20:27 +12:00
parent dc03856ca1
commit 33cc3a13e8

View File

@ -1,5 +1,6 @@
<?php <?php
class VersionFeedFunctionalTest extends FunctionalTest { class VersionFeedFunctionalTest extends FunctionalTest {
protected $usesDatabase = true;
protected $requiredExtensions = array( protected $requiredExtensions = array(
'Page' => array('VersionFeed'), 'Page' => array('VersionFeed'),
@ -17,6 +18,10 @@ class VersionFeedFunctionalTest extends FunctionalTest {
$this->userIP = isset($_SERVER['HTTP_CLIENT_IP']) ? $_SERVER['HTTP_CLIENT_IP'] : null; $this->userIP = isset($_SERVER['HTTP_CLIENT_IP']) ? $_SERVER['HTTP_CLIENT_IP'] : null;
Config::nest(); Config::nest();
// Enable history by default
Config::inst()->update('VersionFeed', 'changes_enabled', true);
Config::inst()->update('VersionFeed', 'allchanges_enabled', true);
// Disable caching and locking by default // Disable caching and locking by default
Config::inst()->update('VersionFeed\Filters\CachedContentFilter', 'cache_enabled', false); Config::inst()->update('VersionFeed\Filters\CachedContentFilter', 'cache_enabled', false);
Config::inst()->update('VersionFeed\Filters\RateLimitFilter', 'lock_timeout', 0); Config::inst()->update('VersionFeed\Filters\RateLimitFilter', 'lock_timeout', 0);