[buddypress-trac] [BuddyPress Trac] #7254: PHPUnit tests does not call plugin activation hook.

buddypress-trac noreply at wordpress.org
Tue Sep 13 16:24:51 UTC 2016


#7254: PHPUnit tests does not call plugin activation hook.
------------------------------+-----------------
 Reporter:  DJPaul            |      Owner:
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  2.7
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:
------------------------------+-----------------
 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.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7254>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list