mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR More backwards handling of $this->fixture references in SapphireTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81320 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b8736bd5b2
commit
c389c01f9c
@ -72,10 +72,15 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
|
||||
|
||||
$fixtureFiles = (is_array($fixtureFile)) ? $fixtureFile : array($fixtureFile);
|
||||
|
||||
$i = 0;
|
||||
foreach($fixtureFiles as $fixtureFilePath) {
|
||||
$fixture = new YamlFixture($fixtureFilePath);
|
||||
$fixture->saveIntoDatabase();
|
||||
$this->fixtures[] = $fixture;
|
||||
|
||||
// backwards compatibility: Load first fixture into $this->fixture
|
||||
if($i == 0) $this->fixture = $fixture;
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user