Skip to content

Commit

Permalink
Merge pull request #8 from dingo-d/fix-argument-checking
Browse files Browse the repository at this point in the history
Fix argument check
  • Loading branch information
dingo-d committed May 18, 2022
2 parents d314f69 + 0dae29a commit 41baf22
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a

_No documentation available about unreleased changes as of yet._

## [1.2.0] Update bootstrap

### Changed
- Fixed the `--group=integration` check in the bootstrap
- Before it depended on the position of the argument, so in PhpStorm running tests
failed because the argument wasn't in the second place.

## [1.1.0] Update base test case

### Changed
Expand All @@ -19,5 +26,6 @@ _No documentation available about unreleased changes as of yet._
- Added the functionality for the WordPress integration tests with PestPHP package.

[Unreleased]: https://github.com/dingo-d/wp-pest-integration-test-setup/compare/main...HEAD
[1.1.0]: https://github.com/https://github.com/dingo-d/wp-pest-integration-test-setup/compare/1.1.0...1.2.0
[1.1.0]: https://github.com/https://github.com/dingo-d/wp-pest-integration-test-setup/compare/1.0.0...1.1.0
[1.0.0]: https://github.com/https://github.com/dingo-d/wp-pest-integration-test-setup/compare/cadf3ac...1.0.0
2 changes: 1 addition & 1 deletion templates/bootstrap-plugin.php.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require_once dirname(__FILE__, 2) . $ds . 'vendor' . $ds . 'autoload.php';
* add additional argument to the test run command if you want to run
* integration tests.
*/
if (isset($GLOBALS['argv']) && isset($GLOBALS['argv'][1]) && strpos($GLOBALS['argv'][1], 'integration') !== false) {
if (isset($GLOBALS['argv']) && in_array('--group=integration', $GLOBALS['argv'], true)) {
if (!file_exists(dirname(__FILE__, 2) . '/wp/tests/phpunit/wp-tests-config.php')) {
// We need to set up core config details and test details
copy(
Expand Down
2 changes: 1 addition & 1 deletion templates/bootstrap-theme.php.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require_once dirname(__FILE__, 2) . $ds . 'vendor' . $ds . 'autoload.php';
* add additional argument to the test run command if you want to run
* integration tests.
*/
if (isset($GLOBALS['argv']) && isset($GLOBALS['argv'][1]) && strpos($GLOBALS['argv'][1], 'integration') !== false) {
if (isset($GLOBALS['argv']) && in_array('--group=integration', $GLOBALS['argv'], true)) {
if (!file_exists(dirname(__FILE__, 2) . '/wp/tests/phpunit/wp-tests-config.php')) {
// We need to set up core config details and test details
copy(
Expand Down

0 comments on commit 41baf22

Please sign in to comment.