From 0da70dafa457564a6adb02140ffeb5dd01f3a982 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 19 Jun 2013 00:13:02 +0200 Subject: [PATCH] Enforce 'dev' environment for test runs Otherwise tests like ControllerTest will fail because Deprecation notices --- dev/SapphireTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dev/SapphireTest.php b/dev/SapphireTest.php index 626e54690..2e29b7d79 100644 --- a/dev/SapphireTest.php +++ b/dev/SapphireTest.php @@ -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) {