Fix tests

This commit is contained in:
Belle Aerni 2023-05-26 21:28:21 -07:00
parent 7ce0a4e439
commit 05008a569c
3 changed files with 5 additions and 5 deletions

View file

@ -11,7 +11,7 @@ class AntTwig
public function __construct(string $theme = null)
{
$twigCache = AntConfig::currentConfig('enableCache') ? AntCachePath : false;
$twigCache = (AntConfig::currentConfig('enableCache') !== 'none') ? AntCachePath : false;
$this->theme = $theme ?? AntConfig::currentConfig('activeTheme');
if (!is_dir(antThemePath . '/' . $this->theme)) {

View file

@ -48,7 +48,7 @@ AntCMS stores its configuration in the human-readable "yaml" file format. The ma
- `siteTitle: AntCMS` - This configuration sets the title of your AntCMS website.
- `forceHTTPS: true` - Set to 'true' by default, enables HTTPs redirection.
- `activeTheme: Default` - Sets what theme AntCMS should use. should match the folder name of the theme you want to use.
- `enableCache: true` - Enables or disables file caching in AntCMS.
- `cacheMode: auto` - Allows AntCMS to auto-detect if it should use APCu or the file system for it's cache. Also accepts 'none', 'apcu', and 'filesystem'.
- `debug: true`- Enabled or disables debug mode.
- `baseURL: antcms.example.com/` - Used to set the baseURL for your AntCMS instance, without the protocol. This will be automatically generated for you, but can be changed if needed.

View file

@ -22,7 +22,7 @@ class MarkdownTest extends TestCase
$currentConfig = AntConfig::currentConfig();
//Ensure cache is enabled
$currentConfig['enableCache'] = true;
$currentConfig['cacheMode'] = 'auto';
AntConfig::saveConfig($currentConfig);
for ($i = 0; $i < 10; ++$i) {
@ -48,7 +48,7 @@ class MarkdownTest extends TestCase
$currentConfig = AntConfig::currentConfig();
//Disable cache
$currentConfig['enableCache'] = false;
$currentConfig['cacheMode'] = 'none';
AntConfig::saveConfig($currentConfig);
$totalTime = 0;
@ -62,7 +62,7 @@ class MarkdownTest extends TestCase
$withoutCache = $totalTime / 10;
//Enable cache
$currentConfig['enableCache'] = true;
$currentConfig['cacheMode'] = 'auto';
AntConfig::saveConfig($currentConfig);
$totalTime = 0;