Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
882bc5d2
Commit
882bc5d2
authored
11 years ago
by
Michael Hamann
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into event_warning
parents
bc2ddb54
16ca217d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
_test/tests/inc/cache_use.test.php
+36
-0
36 additions, 0 deletions
_test/tests/inc/cache_use.test.php
with
36 additions
and
0 deletions
_test/tests/inc/cache_use.test.php
0 → 100644
+
36
−
0
View file @
882bc5d2
<?php
/**
* Class cache_use_test
*
* Tests if caching can actually be used
*/
class
cache_use_test
extends
DokuWikiTest
{
/** @var cache_renderer $cache */
private
$cache
;
function
setUp
()
{
global
$ID
;
parent
::
setUp
();
$ID
=
'cached'
;
$file
=
wikiFN
(
$ID
);
saveWikiText
(
$ID
,
'Content'
,
'Created'
);
// set the modification time a second in the past in order to ensure that the cache is newer than the page
touch
(
$file
,
time
()
-
1
);
# Create cache. Note that the metadata cache is used as the xhtml cache triggers metadata rendering
$this
->
cache
=
new
cache_renderer
(
$ID
,
$file
,
'metadata'
);
$this
->
cache
->
storeCache
(
'Test'
);
}
function
test_use
()
{
$this
->
assertTrue
(
$this
->
cache
->
useCache
());
}
function
test_purge
()
{
$this
->
assertFalse
(
$this
->
cache
->
useCache
(
array
(
'purge'
=>
true
)));
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment