Added a $force flag to bootAll and registerAll method for unit tests
Fixes #2592
This commit is contained in:
parent
d2082e0ea0
commit
f7e80b2cb6
|
|
@ -149,9 +149,9 @@ class PluginManager
|
||||||
* Runs the register() method on all plugins. Can only be called once.
|
* Runs the register() method on all plugins. Can only be called once.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function registerAll()
|
public function registerAll($force = false)
|
||||||
{
|
{
|
||||||
if ($this->registered) {
|
if ($this->registered && !$force) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -241,9 +241,9 @@ class PluginManager
|
||||||
/**
|
/**
|
||||||
* Runs the boot() method on all plugins. Can only be called once.
|
* 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue