Enforce 'dev' environment for test runs

Otherwise tests like ControllerTest will fail because Deprecation notices
This commit is contained in:
Ingo Schommer 2013-06-19 00:13:02 +02:00
parent 1d402dd513
commit 0da70dafa4

View File

@ -287,6 +287,10 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
public function setUpOnce() {
$isAltered = false;
if(!Director::isDev()) {
user_error('Tests can only run in "dev" mode', E_USER_ERROR);
}
// Remove any illegal extensions that are present
foreach($this->illegalExtensions as $class => $extensions) {
foreach($extensions as $extension) {