mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Enforce 'dev' environment for test runs
Otherwise tests like ControllerTest will fail because Deprecation notices
This commit is contained in:
parent
1d402dd513
commit
0da70dafa4
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user