Skip to content

DataFactory Module setLocale Not Working #5

Description

I want to change the locale of Faker

Config Extended DataFactory.php

The setLocale configuration is specified in the package: https://github.com/thephpleague/factory-muffin

namespaceHelper;
useCodeception\Module\DataFactoryasBaseDataFactory;
useLeague\FactoryMuffin\Faker\FacadeasFaker;
class DataFactory extends BaseDataFactory
{
publicfunction_beforeSuite($settings = [])
{
parent::_beforeSuite($settings);
Faker::setLocale('es_PE'); //Not Working
}
}

Details

  • Codeception version: 3.0
  • PHP Version: 7.2.17
  • Operating System: Linux
  • Installation type: Composer
  • Suite api.suite.yml configuration:
class_name: ApiTestermodules:
enabled:
- Symfony:
app_path: 'app'var_path: 'var'environment: 'test'
- REST:
url: /apidepends: Symfony
- Doctrine2:
cleanup: truedepends: Symfony
- Helper\DataFactory:
cleanup: truedepends: Doctrine2factories: tests/_support/factories
- \Helper\Api

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions