David Lednik
David Lednik

Reputation: 81

Use test data instead of fixtures in CakePHP tests

Is there a way to just use actual test data instead of writing all the fixtures for testing CakePHP website?

Upvotes: 0

Views: 148

Answers (1)

Ishan Vyas
Ishan Vyas

Reputation: 15

There is bunch of CakePHP plugins out there that doesn't use fixtures.

  1. cakedc/cakephp-db-test: This doesn't use fixtures at all. Instead, it uses an additional template database that is initialized based on the file config/sql/test_db.sql. Also you can find a nice blog post regarding this plugin here.

  2. pakacuda/cakephp-fixture-factories: This plugin also doesn't use any fixtures, but it uses factories to quickly whip up bunch of fake data on the fly, it also persist data.

Also you can check out awesome plugin from here.

Upvotes: 1

Related Questions