Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
apc
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
apc
Commits
e60d39ff
Verified
Commit
e60d39ff
authored
7 months ago
by
Alberto Paderno
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3463819
: The test classes do not enable the Alternative PHP Cache module
parent
d16a7a5a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!31
Issue #3463819: The test classes do not enable the Alternative PHP Cache module
Pipeline
#234034
passed
7 months ago
Stage: build
Stage: validate
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
drupal_apc_cache.inc
+1
-0
1 addition, 0 deletions
drupal_apc_cache.inc
tests/apc.test
+30
-4
30 additions, 4 deletions
tests/apc.test
with
31 additions
and
4 deletions
drupal_apc_cache.inc
+
1
−
0
View file @
e60d39ff
...
...
@@ -28,6 +28,7 @@ class DrupalApcCache implements DrupalCacheInterface {
* @var array
*/
protected
static
$operations
=
array
();
/**
* The cache bin.
*
...
...
This diff is collapsed.
Click to expand it.
tests/apc.test
+
30
−
4
View file @
e60d39ff
...
...
@@ -35,10 +35,36 @@ class ApcCacheTestCase extends DrupalWebTestCase {
* {@inheritdoc}
*/
protected
function
setUp
()
{
parent
::
setUp
(
func_get_args
());
variable_set
(
"cache_flush_
{
$this
->
defaultBin
}
"
,
0
);
variable_set
(
"cache_class_
{
$this
->
defaultBin
}
"
,
'DrupalApcCache'
);
if
(
extension_loaded
(
'apcu'
)
&&
apcu_enabled
())
{
$modules
=
func_get_args
();
// Allow the child classes to require their own modules.
if
(
isset
(
$modules
[
0
]))
{
if
(
is_array
(
$modules
[
0
]))
{
$modules
=
$modules
[
0
];
array_unshift
(
$modules
,
'apc'
);
}
elseif
(
is_string
(
$modules
[
0
]))
{
$modules
=
array
(
'apc'
,
$modules
[
0
]);
}
}
else
{
$modules
=
array
(
'apc'
);
}
parent
::
setUp
(
$modules
);
$this
->
defaultBin
=
'cache_apc'
;
$this
->
defaultCid
=
'test_temporary'
;
$this
->
defaultValue
=
'CacheTest'
;
variable_set
(
"cache_flush_
{
$this
->
defaultBin
}
"
,
0
);
variable_set
(
"cache_class_
{
$this
->
defaultBin
}
"
,
'DrupalApcCache'
);
}
else
{
// If the APCu extension is not available, disable the tests.
$this
->
setup
=
FALSE
;
}
}
/**
...
...
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