From c389c01f9c3e3aa33e7677500d5863d2f145242e Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 8 Jul 2009 04:09:10 +0000 Subject: [PATCH] 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 --- dev/SapphireTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dev/SapphireTest.php b/dev/SapphireTest.php index 84eba12f0..0636a7cdf 100644 --- a/dev/SapphireTest.php +++ b/dev/SapphireTest.php @@ -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++; }