Skip to content

Commit 8c545c5

Browse files
authored
Merge pull request #262 from wp-cli/replicate-258
Update plugin/theme test scaffolding
2 parents ca39560 + 25f6eb6 commit 8c545c5

File tree

5 files changed

+7
-15
lines changed

5 files changed

+7
-15
lines changed

features/scaffold-plugin-tests.feature

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ Feature: Scaffold plugin unit tests
7575
env: WP_VERSION=trunk
7676
- php: 5.6
7777
env: WP_TRAVISCI=phpcs
78-
- php: 5.3
79-
env: WP_VERSION=latest
8078
"""
8179

8280
When I run `wp eval "if ( is_executable( '{PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh' ) ) { echo 'executable'; } else { exit( 1 ); }"`

features/scaffold-theme-tests.feature

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ Feature: Scaffold theme unit tests
7171
env: WP_VERSION=trunk
7272
- php: 5.6
7373
env: WP_TRAVISCI=phpcs
74-
- php: 5.3
75-
env: WP_VERSION=latest
7674
"""
7775

7876
When I run `wp eval "if ( is_executable( '{THEME_DIR}/p2child/bin/install-wp-tests.sh' ) ) { echo 'executable'; } else { exit( 1 ); }"`

features/scaffold.feature

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ Feature: WordPress code scaffolding
231231
"""
232232
And the {PLUGIN_DIR}/hello-world/.phpcs.xml.dist file should contain:
233233
"""
234-
<config name="testVersion" value="5.3-"/>
234+
<config name="testVersion" value="5.6-"/>
235235
"""
236236
And the {PLUGIN_DIR}/hello-world/hello-world.php file should contain:
237237
"""
@@ -492,8 +492,6 @@ Feature: WordPress code scaffolding
492492
env: WP_VERSION=trunk
493493
- php: 5.6
494494
env: WP_TRAVISCI=phpcs
495-
- php: 5.3
496-
env: WP_VERSION=latest
497495
"""
498496
499497
@require-php-5.6 @require-wp-4.6

templates/.phpcs.xml.dist

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,15 @@
1818

1919
<!-- Rules: Check PHP version compatibility -->
2020
<!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
21-
<config name="testVersion" value="5.3-"/>
21+
<config name="testVersion" value="5.6-"/>
2222
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP -->
2323
<rule ref="PHPCompatibilityWP"/>
2424

2525
<!-- Rules: WordPress Coding Standards -->
2626
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
2727
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
2828
<config name="minimum_supported_wp_version" value="4.6"/>
29-
<rule ref="WordPress">
30-
<exclude name="WordPress.VIP"/>
31-
</rule>
29+
<rule ref="WordPress"/>
3230
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
3331
<properties>
3432
<!-- Value: replace the function, class, and variable prefixes used. Separate multiple prefixes with a comma. -->

templates/plugin-travis.mustache

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ matrix:
3030
{{/wp_versions_to_test}}
3131
- php: 5.6
3232
env: WP_TRAVISCI=phpcs
33-
- php: 5.3
34-
env: WP_VERSION=latest
35-
dist: precise
3633

3734
before_script:
3835
- export PATH="$HOME/.composer/vendor/bin:$PATH"
@@ -50,7 +47,10 @@ before_script:
5047
- |
5148
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
5249
composer global require wp-coding-standards/wpcs
53-
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
50+
composer global require phpcompatibility/php-compatibility
51+
composer global require phpcompatibility/phpcompatibility-paragonie
52+
composer global require phpcompatibility/phpcompatibility-wp
53+
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs,$HOME/.composer/vendor/phpcompatibility/php-compatibility,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-wp
5454
fi
5555

5656
script:

0 commit comments

Comments
 (0)