mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Don't flush manifests in tests by default
It's massively slowing down test execution, particularly for rapid execution through test-driven-development (TDD)
This commit is contained in:
parent
3b7802bb51
commit
a2bb70c46d
@ -31,7 +31,7 @@ Tests are run from the commandline, in your webroot folder:
|
||||
* `vendor/bin/phpunit vendor/silverstripe/framework/tests/`: Run all tests of a specific module
|
||||
* `vendor/bin/phpunit vendor/silverstripe/framework/tests/filesystem`: Run specific tests within a specific module
|
||||
* `vendor/bin/phpunit vendor/silverstripe/framework/tests/filesystem/FolderTest.php`: Run a specific test
|
||||
* `vendor/bin/phpunit vendor/silverstripe/framework/tests '' flush=all`: Run tests with optional request parameters (note the empty second argument)
|
||||
* `vendor/bin/phpunit vendor/silverstripe/framework/tests '' flush=1`: Run tests with optional request parameters (note the empty second argument)
|
||||
|
||||
Check the PHPUnit manual for all available [command line arguments](http://www.phpunit.de/manual/current/en/textui.html).
|
||||
|
||||
|
@ -983,6 +983,7 @@ class SapphireTest extends PHPUnit_Framework_TestCase implements TestOnly
|
||||
// Test application
|
||||
$kernel = new TestKernel(BASE_PATH);
|
||||
$app = new HTTPApplication($kernel);
|
||||
$flush = array_key_exists('flush', $request->getVars());
|
||||
|
||||
// Custom application
|
||||
$app->execute($request, function (HTTPRequest $request) {
|
||||
@ -998,7 +999,7 @@ class SapphireTest extends PHPUnit_Framework_TestCase implements TestOnly
|
||||
$controller->setRequest($request);
|
||||
$controller->pushCurrent();
|
||||
$controller->doInit();
|
||||
}, true);
|
||||
}, $flush);
|
||||
|
||||
// Register state
|
||||
static::$state = SapphireTestState::singleton();
|
||||
|
Loading…
Reference in New Issue
Block a user