Sim
Well-known member
Okay - so not exactly a bug, but there's currently no workaround that I can reasonably think of, so I'm going to call it one.
I am writing a unit testing framework for XenForo addons using PHPUnit.
Right now, I'm having to instantiate the application once per test class rather than the more flexible option of doing it once per individual test.
We really need to be able to destroy the application (ie unset \XF::$app) so that it can be reinstantiated during the next test.
Simply adding something like the following to the
I am writing a unit testing framework for XenForo addons using PHPUnit.
Right now, I'm having to instantiate the application once per test class rather than the more flexible option of doing it once per individual test.
We really need to be able to destroy the application (ie unset \XF::$app) so that it can be reinstantiated during the next test.
Simply adding something like the following to the
\XF
class would probably do the trick:
PHP:
public static function destroyApp()
{
self::$app = null;
}
Upvote
1