Skip to content

Commit

Permalink
Merge pull request Sylius#3560 from GSadee/locale-fixtures-fixes
Browse files Browse the repository at this point in the history
[FixturesBundle] Reverted loading fakers with the available locales
  • Loading branch information
Paweł Jędrzejewski committed Nov 11, 2015
2 parents 25e283e + fceb55b commit 322a0be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
14 changes: 1 addition & 13 deletions DataFixtures/DataFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,7 @@ public function setContainer(ContainerInterface $container = null)
$this->faker = $this->fakers[$this->defaultLocale];
}

foreach ($this->getLocales() as $local) {
$this->fakers[$local->getCode()] = FakerFactory::create($local->getCode());
}
}

/**
* Return locales available from the database
*
* @return mixed
*/
public function getLocales()
{
return $this->getLocaleRepository()->findAll();
$this->fakers['es_ES'] = FakerFactory::create('es_ES');
}

public function __call($method, $arguments)
Expand Down
4 changes: 2 additions & 2 deletions DataFixtures/ORM/LoadLocalesData.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
class LoadLocalesData extends DataFixture
{
protected $locales = array(
private $locales = array(
'en_US' => true,
'en_GB' => true,
'es_ES' => true,
Expand Down Expand Up @@ -57,6 +57,6 @@ public function load(ObjectManager $manager)
*/
public function getOrder()
{
return 1;
return 10;
}
}

0 comments on commit 322a0be

Please sign in to comment.