Skip to content

Commit

Permalink
Merge pull request #86 from BenjaminMedia/WILL-806/add-tests
Browse files Browse the repository at this point in the history
WILL-806/add tests
  • Loading branch information
lms-it authored Aug 17, 2018
2 parents a224728 + 6e8bdc5 commit 519f8a7
Show file tree
Hide file tree
Showing 13 changed files with 6,219 additions and 75 deletions.
17 changes: 17 additions & 0 deletions .env.codeception
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
WP_ROOT_FOLDER="wordpress"
WP_ADMIN_PATH="/wp-admin"
DB_NAME="wp"
DB_HOST="localhost"
DB_USER="root"
DB_PASSWORD="secret"
TABLE_PREFIX="wp_"
TEST_DB_NAME="wp-tests"
TEST_DB_HOST="localhost"
TEST_DB_USER="root"
TEST_DB_PASSWORD="secret"
TEST_TABLE_PREFIX="wp_"
WP_URL="http://wp.localhost"
WP_DOMAIN="wp.localhost"
ADMIN_EMAIL="admin@wp.localhost"
ADMIN_USERNAME="admin"
ADMIN_PASSWORD="password"
22 changes: 22 additions & 0 deletions codeception.dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
paths:
tests: tests
output: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
actor_suffix: Tester
extensions:
enabled:
- Codeception\Extension\RunFailed
commands:
- Codeception\Command\GenerateWPUnit
- Codeception\Command\GenerateWPRestApi
- Codeception\Command\GenerateWPRestController
- Codeception\Command\GenerateWPRestPostTypeController
- Codeception\Command\GenerateWPAjax
- Codeception\Command\GenerateWPCanonical
- Codeception\Command\GenerateWPXMLRPC
- Codeception\Command\DbSnapshot
- tad\Codeception\Command\SearchReplace
params:
- .env.codeception
12 changes: 11 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,21 @@
"bonnier/willow-mu-plugins": "^1.1"
},
"require-dev": {
"johnpbloch/wordpress": "^4.9"
"johnpbloch/wordpress": "^4.9",
"phpunit/phpunit": "7.1.*",
"lucatume/wp-browser": "^2.1"
},
"autoload": {
"psr-4": {
"Bonnier\\WP\\Cxense\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Bonnier\\WP\\Cxense\\Tests\\": "tests"
}
},
"scripts": {
"wpunit": "vendor/bin/codecept run wpunit"
}
}
Loading

0 comments on commit 519f8a7

Please sign in to comment.