From 43917edc97801ce59e43f456f38b64e5b7a53026 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 17 Nov 2016 17:50:28 +1300 Subject: [PATCH] Cleanup FeatureContext --- tests/behat/features/bootstrap/FeatureContext.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/behat/features/bootstrap/FeatureContext.php b/tests/behat/features/bootstrap/FeatureContext.php index c3dc7402c..b6617efa4 100644 --- a/tests/behat/features/bootstrap/FeatureContext.php +++ b/tests/behat/features/bootstrap/FeatureContext.php @@ -8,6 +8,8 @@ use SilverStripe\BehatExtension\Context\LoginContext; use SilverStripe\BehatExtension\Context\FixtureContext; use SilverStripe\BehatExtension\Context\EmailContext; use SilverStripe\Core\Injector\Injector; +use SilverStripe\Dev\BehatFixtureFactory; +use SilverStripe\Dev\FixtureFactory; /** @@ -55,7 +57,9 @@ class FeatureContext extends SilverStripeContext { parent::setMinkParameters($parameters); if(isset($parameters['files_path'])) { - $this->getSubcontext('FixtureContext')->setFilesPath($parameters['files_path']); + /** @var FixtureContext $fixtureContext */ + $fixtureContext = $this->getSubcontext('FixtureContext'); + $fixtureContext->setFilesPath($parameters['files_path']); } } @@ -64,7 +68,7 @@ class FeatureContext extends SilverStripeContext { */ public function getFixtureFactory() { if(!$this->fixtureFactory) { - $this->fixtureFactory = Injector::inst()->create('SilverStripe\\Dev\\BehatFixtureFactory'); + $this->fixtureFactory = Injector::inst()->create(BehatFixtureFactory::class); } return $this->fixtureFactory; }