mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 14:06:00 +02:00
Merge pull request #52 from open-sausages/pulls/4.0/upgrader-tweaks
Upgrade code with upgrader
This commit is contained in:
commit
2b64499e36
@ -1,6 +1,7 @@
|
|||||||
mappings:
|
mappings:
|
||||||
TestSessionController: SilverStripe\TestSession\TestSessionController
|
TestSessionController: SilverStripe\TestSession\TestSessionController
|
||||||
TestSessionEnvironment: SilverStripe\TestSession\TestSessionEnvironment
|
TestSessionEnvironment: SilverStripe\TestSession\TestSessionEnvironment
|
||||||
TestSessionRequestFilter: SilverStripe\TestSession\TestSessionRequestFilter
|
TestSessionRequestFilter: SilverStripe\TestSession\TestSessionHTTPMiddleware
|
||||||
TestSessionStubCodeWriter: SilverStripe\TestSession\TestSessionStubCodeWriter
|
TestSessionStubCodeWriter: SilverStripe\TestSession\TestSessionStubCodeWriter
|
||||||
TestSessionStubCodeWriterTest: SilverStripe\TestSession\Tests\TestSessionStubCodeWriterTest
|
excludedPaths:
|
||||||
|
- '*/testsession/_config/services.yml'
|
||||||
|
@ -3,4 +3,4 @@ Name: testsessionroutes
|
|||||||
---
|
---
|
||||||
SilverStripe\Control\Director:
|
SilverStripe\Control\Director:
|
||||||
rules:
|
rules:
|
||||||
'dev/testsession': 'TestSessionController'
|
dev/testsession: SilverStripe\TestSession\TestSessionController
|
||||||
|
@ -12,6 +12,7 @@ use SilverStripe\Core\Extensible;
|
|||||||
use SilverStripe\Core\Injector\Injectable;
|
use SilverStripe\Core\Injector\Injectable;
|
||||||
use SilverStripe\Core\Injector\Injector;
|
use SilverStripe\Core\Injector\Injector;
|
||||||
use SilverStripe\Dev\FixtureFactory;
|
use SilverStripe\Dev\FixtureFactory;
|
||||||
|
use SilverStripe\Dev\YamlFixture;
|
||||||
use SilverStripe\ORM\Connect\TempDatabase;
|
use SilverStripe\ORM\Connect\TempDatabase;
|
||||||
use SilverStripe\ORM\DatabaseAdmin;
|
use SilverStripe\ORM\DatabaseAdmin;
|
||||||
use SilverStripe\ORM\DB;
|
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.");
|
throw new LogicException("Fixture file must be inside the tests subfolder of one of your modules.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$factory = Injector::inst()->create('SilverStripe\\Dev\\FixtureFactory');
|
$factory = Injector::inst()->create(FixtureFactory::class);
|
||||||
$fixture = Injector::inst()->create('SilverStripe\\Dev\\YamlFixture', $fixtureFile);
|
$fixture = Injector::inst()->create(YamlFixture::class, $fixtureFile);
|
||||||
$fixture->writeInto($factory);
|
$fixture->writeInto($factory);
|
||||||
|
|
||||||
$state = $this->getState();
|
$state = $this->getState();
|
||||||
|
Loading…
Reference in New Issue
Block a user