Opened 10 years ago
Closed 10 years ago
#7254 closed defect (bug) (fixed)
PHPUnit tests does not call plugin activation hook.
| Reported by: | DJPaul | Owned by: | djpaul |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.7 |
| Component: | Build/Test Tools | Version: | |
| Severity: | normal | 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I have a fixed, but it's tied up in #7227. I'll see if I can split it.