Last active
November 11, 2018 19:07
-
-
Save Zayon/283740e85cc99b000d4925609e609aef to your computer and use it in GitHub Desktop.
Fixtures in Symfony 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
use Behat\Behat\Context\Context; | |
class FixtureContext implements Context | |
{ | |
// Empty for now | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
use Behat\Behat\Context\Context; | |
use Doctrine\Bundle\DoctrineBundle\Registry; | |
use Fidry\AliceDataFixtures\LoaderInterface; | |
class FixtureContext implements Context | |
{ | |
/** @var LoaderInterface */ | |
private $loader; | |
/** @var string */ | |
private $fixturesBasePath; | |
public function __construct( | |
Registry $doctrine, | |
LoaderInterface $loader, | |
string $fixturesBasePath | |
) { | |
$this->loader = $loader; | |
$this->fixturesBasePath = $fixturesBasePath; | |
// use odctrine to create the sqlite database | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
use Behat\Behat\Context\Context; | |
use Doctrine\Bundle\DoctrineBundle\Registry; | |
use Fidry\AliceDataFixtures\LoaderInterface; | |
class FixtureContext implements Context | |
{ | |
/** @var LoaderInterface */ | |
private $loader; | |
/** @var string */ | |
private $fixturesBasePath; | |
public function __construct( | |
Registry $doctrine, | |
LoaderInterface $loader, | |
string $fixturesBasePath | |
) { | |
$this->loader = $loader; | |
$this->fixturesBasePath = $fixturesBasePath; | |
// use odctrine to create the sqlite database | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment