From fe7a28266ce45b31558d93adc6384d73fa5d0493 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 9 Apr 2013 01:08:34 +0200 Subject: [PATCH] 3.1 compat --- code/TestSessionController.php | 5 +++-- templates/Includes/TestSession_State.ss | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/code/TestSessionController.php b/code/TestSessionController.php index cd28761..71135cc 100644 --- a/code/TestSessionController.php +++ b/code/TestSessionController.php @@ -4,7 +4,7 @@ */ class TestSessionController extends Controller { - static $allowed_actions = array( + private static $allowed_actions = array( 'index', 'start', 'set', @@ -98,8 +98,9 @@ class TestSessionController extends Controller { throw new LogicException("Fixture file must be inside the tests subfolder of one of your modules."); } + $factory = Injector::inst()->create('FixtureFactory'); $fixture = Injector::inst()->create('YamlFixture', $fixtureFile); - $fixture->saveIntoDatabase(); + $fixture->writeInto($factory); Session::add_to_array('testsession.fixtures', $fixtureFile); diff --git a/templates/Includes/TestSession_State.ss b/templates/Includes/TestSession_State.ss index 169959d..bcabd78 100644 --- a/templates/Includes/TestSession_State.ss +++ b/templates/Includes/TestSession_State.ss @@ -2,9 +2,9 @@

Current testing state

<% end_if %> \ No newline at end of file