Skip to content

CakePHP Fixture FactoriesWrite and run your tests faster.

Build expressive test fixtures with associations, scenarios, and pluggable data generators — for CakePHP and beyond.

CakePHP Fixture Factories

Quick Example

php
ArticleFactory::make(5)
    ->with('Authors[3].Address.City.Country')
    ->persistEntities();

Five articles, each with three authors, each with an address, city and country — persisted in one expression.

Installation

bash
composer require --dev dereuromark/cakephp-fixture-factories

Then load the plugin and configure the fixture strategy. See Setup for full instructions.

Migrating from vierge-noire?

This is a maintained fork of vierge-noire/cakephp-fixture-factories. The main breaking change is the generator abstraction — see the short migration guide.

Released under the MIT License.