JDGrimes / wpppb

Bootstrap for integration testing WordPress plugins with PHPUnit
MIT License
13 stars 3 forks source link

Deactivation after usage simulation fails #15

Closed JDGrimes closed 7 years ago

JDGrimes commented 7 years ago
Fatal error: Uncaught Error: Call to undefined function deactivate_plugins() in /Users/johngrimes/git/_plugins/wprpg-attack/vendor/jdgrimes/wpppb/src/bin/simulate-plugin-use.php on line 43

Error: Call to undefined function deactivate_plugins() in /Users/johngrimes/git/_plugins/wprpg-attack/vendor/jdgrimes/wpppb/src/bin/simulate-plugin-use.php on line 43

Call Stack:
    0.0036     358256   1. {main}() /Users/johngrimes/git/_plugins/wprpg-attack/vendor/jdgrimes/wpppb/src/bin/simulate-plugin-use.php:0

This is because the deactivate_plugins() function is in wp-admin/includes/plugin.php, which isn't loaded by WordPress by default (that is, when not is_admin()).