FixturesShell - Share your test data
Posted by Felix Geisendörfer, on May 03, 2008 - in PHP & CakePHP » Controllers, Components & Shells
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
6 Comments
Kim: You should not get that. Have you created the model for the fixtures you try to create?
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!
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!
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?
I'm trying this (for the first time) with [CakePHP version: 1.2.3.8166]
I'm getting the following error:
Error: Class FixtureizeShell could not be loaded

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?