Contact Us

FixturesShell - Share your test data

Posted on 3/5/08 by Felix Geisendörfer

Hey folks,

for some of the projects Tim and I recently got involved with I noticed that I needed a way to share a set of test data with the other people working on the project. The result is a simple shell leveraging CakePHP 1.2's fixtures. Usually those are used for unit testing your Models and Behaviors, but they also do a great job at sharing a common set of data within a project.

So if you're interested to try it, check out the project page and let me know what you think.

-- Felix Geisendörfer aka the_undefined


You can skip to the end and add a comment.

Kim Fransman said on Jun 07, 2008:

Hi Felix. Tried this out today and got a:
Fatal error: Cannot redeclare class Model in /cake/libs/model/model.php on line 2651

Anything you encountered?

Felix Geisendörfer said on Jun 07, 2008:

Kim: You should not get that. Have you created the model for the fixtures you try to create?

Kim Fransman said on Jun 10, 2008:

It was one of those stupid mistakes where i had the path to console in my bash_login set to an older version of cake. Seemed strange either way but i got it fixed by just correcting the path!

Jeremy Race  said on Sep 04, 2008:

Just remember that if your queries are too big, ie. you have a lot of data to insert per row, to make sure to increase your packet size...otherwise you'll get a "MySQL Server has Gone Away" error. MySQL defaults to 16M I believe, however, you can increase it by starting the server with "mysqld --max_allowed_packet=32M" where 32M is the size.

If you're running it as a service in Windows, you can use the GUI "Services Control Panel/Manager" to set a start parameter - this is located in the Windows Control Panel/Administrative Tools/Services.

This Shell works great...once I changed my packet size :) Thanks!

Rob Wilkerson said on Nov 10, 2008:

Hey, Felix -

I was looking for the fixtures shell tonight and I can't seem to track it down. I know I've downloaded it before, but the link on the project page just redirects me to the scraps home on git - not the the shell itself. I dug into the cakephp/ directory, but I only see the fixturize file. Is fixtures extinct?

alan blount said on May 26, 2009:

I'm trying this (for the first time) with [CakePHP version:]

I'm getting the following error:

Error: Class FixtureizeShell could not be loaded

This post is too old. We do not allow comments here anymore in order to fight spam. If you have real feedback or questions for the post, please contact us.