FIX Helpful warning when phpunit bootstrap appears misconfigured

This commit is contained in:
Daniel Hensby 2017-10-25 17:45:38 +01:00
parent 32cef975ef
commit cbac375590
No known key found for this signature in database
GPG Key ID: 5DE415D786BBB2FD

View File

@ -171,6 +171,13 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
public function setUp() {
if (!defined('FRAMEWORK_PATH')) {
trigger_error(
'Missing constants, did you remember to include the test bootstrap in your phpunit.xml file?',
E_USER_WARNING
);
}
//nest config and injector for each test so they are effectively sandboxed per test
Config::nest();
Injector::nest();