Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
W
WP Redis User Session Storage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WP Plugins
WP Redis User Session Storage
Commits
e8c6e567
Commit
e8c6e567
authored
Jun 03, 2019
by
Erick Hitter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Begin tests
parent
8c55298d
Pipeline
#1165
failed with stage
in 2 minutes and 49 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
20 deletions
+36
-20
.gitlab-ci.yml
.gitlab-ci.yml
+6
-0
inc/class-wp-redis-user-session-storage.php
inc/class-wp-redis-user-session-storage.php
+9
-0
tests/test-plugin.php
tests/test-plugin.php
+21
-0
tests/test-sample.php
tests/test-sample.php
+0
-20
No files found.
.gitlab-ci.yml
View file @
e8c6e567
...
...
@@ -28,6 +28,7 @@ PHPunit:PHP5.3:MySQL:
image
:
containers.ethitter.com:443/docker/images/php:5.3
services
:
-
mysql:5.6
-
redis:latest
script
:
-
find . -type "f" -iname "*.php" | xargs -L "1" php -l
-
phpunit
...
...
@@ -37,6 +38,7 @@ PHPunit:PHP5.6:MySQL:
image
:
containers.ethitter.com:443/docker/images/php:5.6
services
:
-
mysql:5.6
-
redis:latest
script
:
-
find . -type "f" -iname "*.php" | xargs -L "1" php -l
-
phpunit
...
...
@@ -46,6 +48,7 @@ PHPunit:PHP7.0:MySQL:
image
:
containers.ethitter.com:443/docker/images/php:7.0
services
:
-
mysql:5.6
-
redis:latest
script
:
-
find . -type "f" -iname "*.php" | xargs -L "1" php -l
-
phpunit
...
...
@@ -55,6 +58,7 @@ PHPunit:PHP7.1:MySQL:
image
:
containers.ethitter.com:443/docker/images/php:7.1
services
:
-
mysql:5.6
-
redis:latest
script
:
-
find . -type "f" -iname "*.php" | xargs -L "1" php -l
-
phpunit
...
...
@@ -64,6 +68,7 @@ PHPunit:PHP7.2:MySQL:
image
:
containers.ethitter.com:443/docker/images/php:7.2
services
:
-
mysql:5.6
-
redis:latest
script
:
-
find . -type "f" -iname "*.php" | xargs -L "1" php -l
-
phpunit
...
...
@@ -73,6 +78,7 @@ PHPunit:PHP7.3:MySQL:
image
:
containers.ethitter.com:443/docker/images/php:7.3
services
:
-
mysql:5.6
-
redis:latest
script
:
-
find . -type "f" -iname "*.php" | xargs -L "1" php -l
-
phpunit
...
...
inc/class-wp-redis-user-session-storage.php
View file @
e8c6e567
...
...
@@ -269,6 +269,15 @@ class WP_Redis_User_Session_Storage extends WP_Session_Tokens {
protected
function
get_key
()
{
return
$this
->
prefix
.
':'
.
$this
->
user_id
;
}
/**
* Is Redis connected?
*
* @return bool
*/
public
function
redis_connected
()
{
return
$this
->
redis_connected
;
}
}
/**
...
...
tests/test-plugin.php
0 → 100755
View file @
e8c6e567
<?php
/**
* Plugin tests
*
* @package WP_Redis_User_Session_Storage
*/
/**
* Class Test_Plugin.
*/
class
Test_Plugin
extends
WP_UnitTestCase
{
/**
* Check that Redis backend is available.
*/
public
function
test_connection
()
{
$this
->
assertTrue
(
WP_Session_Tokens
::
get_instance
(
0
)
->
redis_connected
(),
'Failed to assert that Redis is available.'
);
}
}
tests/test-sample.php
deleted
100755 → 0
View file @
8c55298d
<?php
/**
* Class SampleTest
*
* @package WP_Redis_User_Session_Storage
*/
/**
* Sample test case.
*/
class
SampleTest
extends
WP_UnitTestCase
{
/**
* A single example test.
*/
public
function
test_sample
()
{
// Replace this with some actual testing code.
$this
->
assertTrue
(
true
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment