Codeception / Codeception/module-datafactory

DataFactory Module setLocale Not Working

未關閉
#5 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
PHP
星號
9
分支
7
PR 合併指標
30 天內沒有已合併 PR

描述

#### 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

```php

namespace Helper;

use Codeception\Module\DataFactory as BaseDataFactory;
use League\FactoryMuffin\Faker\Facade as Faker;

class DataFactory extends BaseDataFactory
{
public function _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:

```yml
class_name: ApiTester
modules:
enabled:
- Symfony:
app_path: 'app'
var_path: 'var'
environment: 'test'
- REST:
url: /api
depends: Symfony
- Doctrine2:
cleanup: true
depends: Symfony
- Helper\DataFactory:
cleanup: true
depends: Doctrine2
factories: tests/_support/factories
- \Helper\Api
```

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。