Upgrade code with upgrader

This commit is contained in:
Damian Mooyman 2017-07-03 15:09:05 +12:00
parent 62cd6303da
commit 0374e935e7
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A
3 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,7 @@
mappings:
TestSessionController: SilverStripe\TestSession\TestSessionController
TestSessionEnvironment: SilverStripe\TestSession\TestSessionEnvironment
TestSessionRequestFilter: SilverStripe\TestSession\TestSessionRequestFilter
TestSessionRequestFilter: SilverStripe\TestSession\TestSessionHTTPMiddleware
TestSessionStubCodeWriter: SilverStripe\TestSession\TestSessionStubCodeWriter
TestSessionStubCodeWriterTest: SilverStripe\TestSession\Tests\TestSessionStubCodeWriterTest
excludedPaths:
- '*/testsession/_config/services.yml'

View File

@ -3,4 +3,4 @@ Name: testsessionroutes
---
SilverStripe\Control\Director:
rules:
'dev/testsession': 'TestSessionController'
dev/testsession: SilverStripe\TestSession\TestSessionController

View File

@ -12,6 +12,7 @@ use SilverStripe\Core\Extensible;
use SilverStripe\Core\Injector\Injectable;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Dev\FixtureFactory;
use SilverStripe\Dev\YamlFixture;
use SilverStripe\ORM\Connect\TempDatabase;
use SilverStripe\ORM\DatabaseAdmin;
use SilverStripe\ORM\DB;
@ -433,8 +434,8 @@ class TestSessionEnvironment
throw new LogicException("Fixture file must be inside the tests subfolder of one of your modules.");
}
$factory = Injector::inst()->create('SilverStripe\\Dev\\FixtureFactory');
$fixture = Injector::inst()->create('SilverStripe\\Dev\\YamlFixture', $fixtureFile);
$factory = Injector::inst()->create(FixtureFactory::class);
$fixture = Injector::inst()->create(YamlFixture::class, $fixtureFile);
$fixture->writeInto($factory);
$state = $this->getState();