aist/aist-alice-fixtures
Composer 安装命令:
composer require aist/aist-alice-fixtures
包简介
Alice Fixtures for ZF2.
README 文档
README
A Zend Framework 2 Module integrating nelmio/alice and fzaninotto/Faker. AistAliceFixtures allows you to create fixtures/fake data for use while developing or testing projects. It provides you a few essential tools to make it very easy to generate complex data with constraints in a readable and easy to edit way.
Installation
Installation of this module uses composer. For composer documentation, please refer to getcomposer.org.
-
Install the module via composer by running:
php composer.phar require aist/aist-alice-fixtures
or download it directly from github and place it in your application's
module/directory. -
Add the
AistAliceFixturesmodule to the module section of yourconfig/application.config.php
Formatters
This module provides additional formatters extending faker. Here is a list of the bundled formatters.
AistAliceFixtures\Faker\Provider\Internet extends Faker\Provider\Internet
slug // 'aut-repellat-commodi-vel-itaque-nihil-id-saepe-nostrum'
uniDecode // 'Zazolc gesla jazn'
<slugify('some text')> allows to pass parameter into slugifier
Example fixture
AistUser\Entity\AistUser: AistUser_{1..10}: username: <username()> fullname: <firstName()> <lastName()> slug: <slugify(@self->fullname)> birthDate: <date()> email: <email()>
Loading fixtures
bin/doctrine-module orm:fixtures:load --force
It will append fixtures to existing DB.
Checklist
- Add truncate data & --append option
- Add tests
统计信息
- 总下载量: 22
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-08-22