You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm new to testing of this kind, so let me know if I'm missing something.
When I run wpcept run I get this error before the integration tests run: array_intersect_key(): Argument #1 is not an array
Commenting out the WPLoader line in the integration.suite.yml file "fixes" the problem. Here's a verbose output:
Including plugin [ananda-x/ananda-x.php] files
The following tables will be dropped:
- posts
- comments
- links
- options
- postmeta
- terms
- term_taxonomy
- term_relationships
- termmeta
- commentmeta
Installing WordPress...
Installing network...
Network activating plugin [ananda-x/ananda-x.php]...
[PHPUnit_Framework_Exception]
array_intersect_key(): Argument #1 is not an array
Exception trace:
() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/codeception/codeception/src/Codeception/Subscriber/ErrorHandler.php:75
Codeception\Subscriber\ErrorHandler->errorHandler() at n/a:n/a
array_intersect_key() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/lucatume/wp-browser/src/includes/tad-functions.php:29
_without_filters() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/lucatume/wp-browser/src/includes/bootstrap.php:146
require_once() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/lucatume/wp-browser/src/Codeception/Module/WPLoader.php:229
Codeception\Module\WPLoader->loadWordPress() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/lucatume/wp-browser/src/Codeception/Module/WPLoader.php:151
Codeception\Module\WPLoader->initialize() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/lucatume/wp-browser/src/Codeception/Module/WPLoader.php:139
Codeception\Module\WPLoader->_initialize() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/codeception/codeception/src/Codeception/SuiteManager.php:81
Codeception\SuiteManager->initialize() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/codeception/codeception/src/Codeception/Codecept.php:207
Codeception\Codecept->runSuite() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/codeception/codeception/src/Codeception/Codecept.php:178
Codeception\Codecept->run() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/codeception/codeception/src/Codeception/Command/Run.php:359
Codeception\Command\Run->runSuites() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/codeception/codeception/src/Codeception/Command/Run.php:286
Codeception\Command\Run->execute() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/symfony/console/Command/Command.php:257
Symfony\Component\Console\Command\Command->run() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/symfony/console/Application.php:849
Symfony\Component\Console\Application->doRunCommand() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/symfony/console/Application.php:193
Symfony\Component\Console\Application->doRun() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/symfony/console/Application.php:124
Symfony\Component\Console\Application->run() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/codeception/codeception/src/Codeception/Application.php:103
Codeception\Application->run() at /Users/nabhacosley/Sites/ananda-designs/plugins/ananda-x/vendor/codeception/codeception/codecept:33
Here's my WPLoader config with a few details obfuscated.
This has to do with WordPress 4.7 no longer using the $merged_filters global. See WordPoints/wordpoints#510 for where I fixed a similar issue in the PHPUnit tests for one of my plugins. Basically, you need to check if $GLOBALS['merged_filters'] is set before doing anything with it, because after 4.7 it won't be.
Hi, I'm new to testing of this kind, so let me know if I'm missing something.
When I run
wpcept run
I get this error before the integration tests run:array_intersect_key(): Argument #1 is not an array
Commenting out the WPLoader line in the integration.suite.yml file "fixes" the problem. Here's a verbose output:
Here's my WPLoader config with a few details obfuscated.
And
integration.suite.yml
:The text was updated successfully, but these errors were encountered: