mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Warning when running tests without flush=1
This is now the default setting for both "sake" and "phpunit" runs, because of performance reasons (every manifest flush takes multiple seconds). On the other hand, we want to make errors like missing classes more obvious to developers. See discussion in https://github.com/silverstripe/sapphire/pull/620
This commit is contained in:
parent
c072dc4757
commit
64669938da
@ -106,6 +106,14 @@ class TestRunner extends Controller {
|
||||
if(!PhpUnitWrapper::has_php_unit()) {
|
||||
die("Please install PHPUnit using pear");
|
||||
}
|
||||
|
||||
if(!isset($_GET['flush']) || !$_GET['flush']) {
|
||||
Debug::message(
|
||||
"WARNING: Manifest not flushed. " .
|
||||
"Add flush=1 as an argument to discover new classes or files.\n",
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function Link() {
|
||||
|
@ -63,3 +63,11 @@ TestRunner::use_test_manifest();
|
||||
|
||||
// Remove the error handler so that PHPUnit can add its own
|
||||
restore_error_handler();
|
||||
|
||||
if(!isset($_GET['flush']) || !$_GET['flush']) {
|
||||
Debug::message(
|
||||
"WARNING: Manifest not flushed. " .
|
||||
"Add flush=1 as an argument to discover new classes or files.\n",
|
||||
false
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue
Block a user