Codeception / Codeception/module-datafactory

DataFactory Module setLocale Not Working

Đang mở
#5 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PHP
Star
9
Fork
7
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.