Commit b845b094 authored by Erick Hitter's avatar Erick Hitter

Fuller test matrix

parent d30d1d2e
Pipeline #996 passed with stages
in 3 minutes and 9 seconds
......@@ -20,10 +20,45 @@ before_script:
composer global require "phpunit/phpunit=4.8.*"
fi
# Install PHPCS and WPCS
- composer global require automattic/vipwpcs
- composer global require phpcompatibility/phpcompatibility-wp
- phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs,$HOME/.composer/vendor/automattic/vipwpcs,$HOME/.composer/vendor/phpcompatibility/php-compatibility,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-wp
PHPunit:PHP5.3:MySQL:
stage: test
image: containers.ethitter.com:443/docker/images/php:5.3
services:
- mysql:5.6
script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpunit
allow_failure: true
PHPunit:PHP5.6:MySQL:
stage: test
image: containers.ethitter.com:443/docker/images/php:5.6
services:
- mysql:5.6
script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpunit
allow_failure: true
PHPunit:PHP7.0:MySQL:
stage: test
image: containers.ethitter.com:443/docker/images/php:7.0
services:
- mysql:5.6
script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpunit
allow_failure: true
PHPunit:PHP7.1:MySQL:
stage: test
image: containers.ethitter.com:443/docker/images/php:7.1
services:
- mysql:5.6
script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpunit
allow_failure: true
PHPunit:PHP7.2:MySQL:
stage: test
......@@ -32,7 +67,6 @@ PHPunit:PHP7.2:MySQL:
- mysql:5.6
script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpcs -n
- phpunit
allow_failure: true
......@@ -43,13 +77,22 @@ PHPunit:PHP7.3:MySQL:
- mysql:5.6
script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpcs -n
- phpunit
allow_failure: true
PHPCS:
stage: test
image: containers.ethitter.com:443/docker/images/php:7.3
before_script:
- composer global require automattic/vipwpcs
- composer global require phpcompatibility/phpcompatibility-wp
- phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs,$HOME/.composer/vendor/automattic/vipwpcs,$HOME/.composer/vendor/phpcompatibility/php-compatibility,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-wp
script:
- phpcs -n
PluginSVN:
stage: deploy
image: containers.ethitter.com:443/docker/images/php:7.3
image: containers.ethitter.com:443/docker/wp-org-plugin-deploy:latest
before_script:
- curl -o ./bin/deploy.sh https://git-cdn.e15r.co/open-source/wp-org-plugin-deploy/raw/master/scripts/deploy.sh
- chmod +x ./bin/deploy.sh
......
......@@ -78,27 +78,4 @@ class PluginTest extends WP_UnitTestCase {
$this->assertNull( $redirect, 'Failed to assert that redirect is not generated for unsupported post status.' );
}
/**
* Indirect test of redirection.
*/
public function test_published_post_redirect_through_artifacts(): void {
add_filter( 'eth_simple_shortlinks_verify_requested_post_support', function( $verify ) {
$this->assertEquals( static::$post_id_published, get_query_var( 'p' ), 'Failed to assert that requested post ID matches ID of published post.' );
return $verify;
} );
add_filter( 'eth_simple_shortlinks_redirect_url', function( $url ) {
$this->assertEquals( get_permalink( static::$post_id_published ), $url, 'Failed to assert that redirect URL is published post\'s permalink.' );
return $url;
} );
$this->go_to( wp_get_shortlink( static::$post_id_published ) );
$this->assertQueryTrue(
'is_404'
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment