Added a $force flag to bootAll and registerAll method for unit tests

Fixes #2592
This commit is contained in:
Samuel Georges 2017-02-05 07:09:27 +11:00
parent d2082e0ea0
commit f7e80b2cb6
1 changed files with 4 additions and 4 deletions

View File

@ -149,9 +149,9 @@ class PluginManager
* Runs the register() method on all plugins. Can only be called once.
* @return void
*/
public function registerAll()
public function registerAll($force = false)
{
if ($this->registered) {
if ($this->registered && !$force) {
return;
}
@ -241,9 +241,9 @@ class PluginManager
/**
* Runs the boot() method on all plugins. Can only be called once.
*/
public function bootAll()
public function bootAll($force = false)
{
if ($this->booted) {
if ($this->booted && !$force) {
return;
}