mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 14:06:00 +02:00
3.1 compat
This commit is contained in:
parent
5f19a6789d
commit
fe7a28266c
@ -4,7 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
class TestSessionController extends Controller {
|
class TestSessionController extends Controller {
|
||||||
|
|
||||||
static $allowed_actions = array(
|
private static $allowed_actions = array(
|
||||||
'index',
|
'index',
|
||||||
'start',
|
'start',
|
||||||
'set',
|
'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.");
|
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 = Injector::inst()->create('YamlFixture', $fixtureFile);
|
||||||
$fixture->saveIntoDatabase();
|
$fixture->writeInto($factory);
|
||||||
|
|
||||||
Session::add_to_array('testsession.fixtures', $fixtureFile);
|
Session::add_to_array('testsession.fixtures', $fixtureFile);
|
||||||
|
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<p>
|
<p>
|
||||||
Current testing state
|
Current testing state
|
||||||
<ul>
|
<ul>
|
||||||
<% control State %>
|
<% loop State %>
|
||||||
<li><strong>$Name:</strong> $Value</li>
|
<li><strong>$Name:</strong> $Value</li>
|
||||||
<% end_control %>
|
<% end_loop %>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
<% end_if %>
|
<% end_if %>
|
Loading…
Reference in New Issue
Block a user