Merge pull request #2116 from chillu/pulls/sapphiretest-env-type

Enforce 'dev' environment for test runs
This commit is contained in:
Sam Minnée 2013-06-18 21:24:37 -07:00
commit 211a3e4e77

View File

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