Fix tests
This commit is contained in:
parent
7ce0a4e439
commit
05008a569c
3 changed files with 5 additions and 5 deletions
|
@ -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)) {
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue