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::new()
    ->count(5)
    ->with('Authors[3].Address.City.Country')
    ->saveMany();

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

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.