From 114a5c39c84c98a297a994ee9cdfbd477d206817 Mon Sep 17 00:00:00 2001 From: Nick Date: Thu, 22 Jan 2015 22:29:21 +1300 Subject: [PATCH] Flush should be off by default - consistant Flushing should be off by default, just like it is when you are on the site normally. It's not obvious that tests always flush when they run and you have to pass flush=0 to turn them off. People expect to have to flush to clear the cache, and the documentation already covers mentions about flushing -> http://doc.silverstripe.org/en/developer_guides/testing/unit_testing/ -> phpunit framework/tests '' flush=all # Run tests with optional `$_GET` parameters (you need an empty second argument) --- dev/TestRunner.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/TestRunner.php b/dev/TestRunner.php index b2b81d787..446506e96 100755 --- a/dev/TestRunner.php +++ b/dev/TestRunner.php @@ -78,9 +78,9 @@ class TestRunner extends Controller { * top of the loader stacks. */ public static function use_test_manifest() { - $flush = true; - if(isset($_GET['flush']) && $_GET['flush'] === '0') { - $flush = false; + $flush = false; + if(isset($_GET['flush']) && ($_GET['flush'] === '1' || $_GET['flush'] == 'all')) { + $flush = true; } $classManifest = new SS_ClassManifest(