Skip to content

Mercator connector test implemented #1180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@
"composer/installers": "~1.0"
},
"require-dev": {
"johnpbloch/wordpress": "^5.4",
"automattic/vipwpcs": "^2.0.0",
"humanmade/mercator": "^1.0",
"johnpbloch/wordpress": "^5.4",
"php-coveralls/php-coveralls": "^2.1",
"phpunit/phpunit": "^5.7",
"wp-cli/wp-cli-bundle": "^2.2",
"wp-coding-standards/wpcs": "^2.2",
"wp-phpunit/wp-phpunit": "^5.4",
"wpsh/local": "^0.2.3",
"wpackagist-plugin/advanced-custom-fields": "5.8.12",
"wpackagist-plugin/easy-digital-downloads": "^2.9.23",
"wpackagist-plugin/user-switching": "^1.5.5"
"wpackagist-plugin/user-switching": "^1.5.5",
"wpsh/local": "^0.2.3"
},
"config": {
"process-timeout": 600,
Expand All @@ -36,7 +37,8 @@
"extra": {
"wordpress-install-dir": "local/public",
"installer-paths": {
"local/public/wp-content/plugins/{$name}/": ["type:wordpress-plugin"]
"local/public/wp-content/plugins/{$name}/": ["type:wordpress-plugin"],
"local/public/wp-content/mu-plugins/{$name}/": ["type:wordpress-muplugin"]
}
},
"scripts": {
Expand Down
42 changes: 41 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ services:
- ./local/config/wp-cli.yml:/var/www/html/wp-cli.yml
- ./local/config/wp-config.php:/var/www/html/wp-config.php
- ./local/config/wp-tests-config.php:/var/www/html/wp-tests-config.php
- ./local/config/sunrise.php:/var/www/html/wp-content/sunrise.php
restart: always
environment:
COMPOSER_HOME: /tmp/.composer
Expand Down
5 changes: 5 additions & 0 deletions local/config/sunrise.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
// Default mu-plugins directory if you haven't set it
defined( 'WPMU_PLUGIN_DIR' ) or define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' );

require WPMU_PLUGIN_DIR . '/mercator/mercator.php';
3 changes: 3 additions & 0 deletions local/config/wp-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@

define( 'ABSPATH', __DIR__ . '/' );

// For mercator.
define( 'SUNRISE', true );

require_once ABSPATH . 'wp-settings.php';
14 changes: 8 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"grunt-wp-deploy": "^2.1.2"
},
"scripts": {
"postinstall": "composer install && npm run build",
"postinstall": "composer install --no-autoloader && composer dumpautoload -o && composer install && npm run build",
"build": "grunt build",
"release": "grunt release",
"deploy": "grunt deploy",
Expand Down
6 changes: 6 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ function() {
require dirname( __DIR__ ) . '/stream.php';
}
);
function xwp_manually_load_mercator() {
define( 'MERCATOR_SKIP_CHECKS', true );
require WPMU_PLUGIN_DIR . '/mercator/mercator.php';
}

tests_add_filter( 'muplugins_loaded', 'xwp_manually_load_mercator' );

// @see https://core.trac.wordpress.org/browser/trunk/tests/phpunit/includes/bootstrap.php
require $_tests_dir . '/includes/bootstrap.php';
Expand Down
Loading