Cleanup FeatureContext

This commit is contained in:
Damian Mooyman 2016-11-17 17:50:28 +13:00 committed by Christopher Joe
parent 875811fdfd
commit 43917edc97

View File

@ -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;
}