2017 © Pedro Peláez
 

library phactory

A Database Factory for PHP Unit Tests

image

chriskite/phactory

A Database Factory for PHP Unit Tests

  • Tuesday, March 24, 2015
  • by jimbojsb
  • Repository
  • 11 Watchers
  • 141 Stars
  • 137,419 Installations
  • PHP
  • 15 Dependents
  • 0 Suggesters
  • 37 Forks
  • 18 Open issues
  • 6 Versions
  • 2 % Grown

The README.md

Phactory: PHP Database Object Factory for Unit Testing

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., (*1)

Phactory was inspired by Factory Girl., (*2)

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
  • MongoDB

Language Support

  • PHP >= 5.3

Limitations

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

The Versions

24/03 2015

dev-next

dev-next http://phactory.org

A Database Factory for PHP Unit Tests

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

  • ext-pdo *
  • ext-pdo_sqlite *
  • ext-mongo *

mongodb database testing mysql sqlite

11/07 2013

dev-master

9999999-dev http://phactory.org

A Database Factory for PHP Unit Tests

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

  • ext-pdo *
  • ext-pdo_sqlite *
  • ext-mongo *

mongodb database testing mysql sqlite

11/07 2013

v0.4.3

0.4.3.0 http://phactory.org

A Database Factory for PHP Unit Tests

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

  • ext-pdo *
  • ext-pdo_sqlite *
  • ext-mongo *

mongodb database testing mysql sqlite

06/11 2012

v0.4.2

0.4.2.0 http://phactory.org

A Database Factory for PHP Unit Tests

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

  • ext-pdo *
  • ext-pdo_sqlite *
  • ext-mongo *

mongodb database testing mysql sqlite

22/08 2012

v0.4.1

0.4.1.0 http://phactory.org

A Database Factory for PHP Unit Tests

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

  • ext-pdo *
  • ext-pdo_sqlite *
  • ext-mongo *

mongodb database testing mysql sqlite

22/08 2012

v0.4

0.4.0.0 http://phactory.org

A Database Factory for PHP Unit Tests

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

  • ext-pdo *
  • ext-pdo_sqlite *
  • ext-mongo *

mongodb database testing mysql sqlite