mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 14:06:00 +02:00
API Don't create fixtures by default
Use @database-defaults in specific scenarios or features to enforce creation.
This commit is contained in:
parent
18cc924245
commit
babd24f4b9
@ -161,12 +161,7 @@ class TestSessionController extends Controller {
|
||||
$fixtureFile = (isset($data['fixture'])) ? $data['fixture'] : null;
|
||||
if($fixtureFile) {
|
||||
$this->loadFixtureIntoDb($fixtureFile);
|
||||
} else {
|
||||
// If no fixture, then use defaults
|
||||
$dataClasses = ClassInfo::subclassesFor('DataObject');
|
||||
array_shift($dataClasses);
|
||||
foreach($dataClasses as $dataClass) singleton($dataClass)->requireDefaultRecords();
|
||||
}
|
||||
}
|
||||
|
||||
// Mailer
|
||||
$mailer = (isset($data['mailer'])) ? $data['mailer'] : null;
|
||||
|
Loading…
Reference in New Issue
Block a user