PHPackages                             chustilla/cakephp-model-factory - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. chustilla/cakephp-model-factory

ActiveLibrary[Testing &amp; Quality](/categories/testing)

chustilla/cakephp-model-factory
===============================

An easy for rapid creation of models for the purpose of testing, inspired by Laravel Model Factory.

1.2.0(5y ago)04MITPHP

Since Jun 7Pushed 5y ago1 watchersCompare

[ Source](https://github.com/chustilla/cakephp-model-factory)[ Packagist](https://packagist.org/packages/chustilla/cakephp-model-factory)[ Docs](https://github.com/chustilla/cakephp-model-factory)[ RSS](/packages/chustilla-cakephp-model-factory/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (3)Versions (8)Used By (0)

cakephp-model-factory
=====================

[](#cakephp-model-factory)

An easy for rapid creation of models for the purpose of testing, inspired by Laravel Model Factory.

Requirements
------------

[](#requirements)

- PHP &gt;=7.2

Installation
------------

[](#installation)

Via Composer

```
$ composer install chustilla/cakephp-model-factory

```

Usage
-----

[](#usage)

### Define factories

[](#define-factories)

Through model definition you will tell to the factory how to populate the entity with data.

An example of model definition would be...

```
# database/factories/BarFactory.php
