Opened 8 years ago
Closed 8 years ago
#7254 closed defect (bug) (fixed)
PHPUnit tests does not call plugin activation hook.
Reported by: | DJPaul | Owned by: | djpaul |
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | |
Cc: |
Description
In our PHPUnit bootstrap, we load BuddyPress into the WP env. by including the BuddyPress file directly, hooked to muplugins_loaded
. This has worked but we have not noticed that it means that the activate_plugin
hooks (etc) that activate_plugins()
would usually trigger, aren't called.
BuddyPress hooks to the activation function in bp_activation()
to call bp_add_options()
, which adds the default values of everything in bp_get_default_options()
to the options table.
This has been masked by the mis-behaviour of bp_get_default_options()
which currently checks for missing options and adds them to the database, whenever the function's called.
I have a fixed, but it's tied up in #7227. I'll see if I can split it.