Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Camo Image Proxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
WP Plugins
Camo Image Proxy
Commits
3794862a
Commit
3794862a
authored
6 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup
parent
a13d5174
No related branches found
No related tags found
1 merge request
!1
Add GitLab CI
Pipeline
#115
passed with warnings
6 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+4
-0
4 additions, 0 deletions
.gitlab-ci.yml
tests/bootstrap.php
+9
-9
9 additions, 9 deletions
tests/bootstrap.php
tests/test-sample.php
+1
-1
1 addition, 1 deletion
tests/test-sample.php
with
14 additions
and
10 deletions
.gitlab-ci.yml
+
4
−
0
View file @
3794862a
...
...
@@ -3,6 +3,10 @@ variables:
MYSQL_DATABASE
:
wordpress_tests
MYSQL_ROOT_PASSWORD
:
mysql
cache
:
paths
:
-
$HOME/.composer
before_script
:
# Install dependencies
...
...
This diff is collapsed.
Click to expand it.
tests/bootstrap.php
+
9
−
9
View file @
3794862a
...
...
@@ -5,27 +5,27 @@
* @package Camo_Image_Proxy
*/
$_tests_dir
=
getenv
(
'WP_TESTS_DIR'
);
$
camo
_tests_dir
=
getenv
(
'WP_TESTS_DIR'
);
if
(
!
$_tests_dir
)
{
$_tests_dir
=
rtrim
(
sys_get_temp_dir
(),
'/\\'
)
.
'/wordpress-tests-lib'
;
if
(
!
$
camo
_tests_dir
)
{
$
camo
_tests_dir
=
rtrim
(
sys_get_temp_dir
(),
'/\\'
)
.
'/wordpress-tests-lib'
;
}
if
(
!
file_exists
(
$_tests_dir
.
'/includes/functions.php'
)
)
{
echo
"Could not find
$_tests_dir
/includes/functions.php, have you run bin/install-wp-tests.sh ?"
.
PHP_EOL
;
if
(
!
file_exists
(
$
camo
_tests_dir
.
'/includes/functions.php'
)
)
{
echo
"Could not find
$
camo
_tests_dir
/includes/functions.php, have you run bin/install-wp-tests.sh ?"
.
PHP_EOL
;
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
exit
(
1
);
}
// Give access to tests_add_filter() function.
require_once
$_tests_dir
.
'/includes/functions.php'
;
require_once
$
camo
_tests_dir
.
'/includes/functions.php'
;
/**
* Manually load the plugin being tested.
*/
function
_manually_load_plugin
()
{
function
camo
_manually_load_plugin
()
{
require
dirname
(
dirname
(
__FILE__
)
)
.
'/camo-image-proxy.php'
;
}
tests_add_filter
(
'muplugins_loaded'
,
'_manually_load_plugin'
);
tests_add_filter
(
'muplugins_loaded'
,
'
camo
_manually_load_plugin'
);
// Start up the WP testing environment.
require
$_tests_dir
.
'/includes/bootstrap.php'
;
require
$
camo
_tests_dir
.
'/includes/bootstrap.php'
;
This diff is collapsed.
Click to expand it.
tests/test-sample.php
+
1
−
1
View file @
3794862a
...
...
@@ -13,7 +13,7 @@ class SampleTest extends WP_UnitTestCase {
/**
* A single example test.
*/
function
test_sample
()
{
public
function
test_sample
()
{
// Replace this with some actual testing code.
$this
->
assertTrue
(
true
);
}
...
...
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