2017 © Pedro Peláez
 

library phactory

A Database Factory for PHP Unit Tests

image

zonuexe/phactory

A Database Factory for PHP Unit Tests

  • Tuesday, December 1, 2015
  • by zonuexe
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 37 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Phactory: PHP Database Object Factory for Unit Testing

Build Status Package version Apache License 2.0, (*1)

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

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

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.

The Versions

01/12 2015

dev-master

9999999-dev http://phactory.org

A Database Factory for PHP Unit Tests

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

mongodb database testing mysql sqlite

01/12 2015

v0.5.0

0.5.0.0 http://phactory.org

A Database Factory for PHP Unit Tests

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

mongodb database testing mysql sqlite

01/12 2015

v0.4.4

0.4.4.0 http://phactory.org

A Database Factory for PHP Unit Tests

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

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-mongo *
  • ext-pdo *
  • ext-pdo_sqlite *

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-mongo *
  • ext-pdo *
  • ext-pdo_sqlite *

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-mongo *
  • ext-pdo *
  • ext-pdo_sqlite *

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-mongo *
  • ext-pdo *
  • ext-pdo_sqlite *

mongodb database testing mysql sqlite