承接 chriskite/phactory 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

chriskite/phactory

最新稳定版本:v0.4.3

Composer 安装命令:

composer require --dev chriskite/phactory

包简介

A Database Factory for PHP Unit Tests

README 文档

README

What is it?

Phactory is an alternative to using database fixtures in your PHP unit tests. Instead of maintaining a separate XML file of data, you define a blueprint for each table, and then create as many different objects as you need.

Phactory was inspired by Factory Girl.

Features

  • Define default values for your table rows once with Phactory::define(), then easily create objects in that table with a call to Phactory::create().
  • Create associations between your defined tables, and the objects will automatically be associated in the database upon creation.
  • Use sequences to create unique values for each successive object you create.

Database Support

  • MySQL
  • Sqlite
  • Postgresql

Language Support

  • PHP >= 5.3

Limitations

  • Each table must have a single integer primary key for associations to work.

统计信息

  • 总下载量: 214.86k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 140
  • 点击次数: 1
  • 依赖项目数: 12
  • 推荐数: 0

GitHub 信息

  • Stars: 140
  • Watchers: 6
  • Forks: 38
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2012-09-20