felixge / debuggable-scraps
- Source
- Commits
- Network (10)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
3fbfca1
commit 3fbfca1bd3205e78aac80414bb8e8556a40496ae
tree c1401d9d8598bd57ec310b1b608d394606ccc2ed
parent 70ca21000c1309128ef9e5b63b704761dc619f7b
tree c1401d9d8598bd57ec310b1b608d394606ccc2ed
parent 70ca21000c1309128ef9e5b63b704761dc619f7b
CakePHP Fixturize Shell
A CakePHP shell to create a fixture using the values of any given database table so one does not have to type it up manually.
Installing
1. Copy fixturize.php to vendors/shells (or app/vendors/shells)
2. That’s it!
Usage / Docs
To create a fixture for your posts table, run the following in your Terminal:
cd cake/console
./cake fixturize posts
This will create a file called app/tests/fixtures/post_fixture.php for you holding all records of that table.
If you want to fixturize more than one table at a time, simply provide more table names as space separated arguments.
In case you previously fixturized a table already, use the —force option to overwrite the old one.
Missing Features
- Fixturize the schema of tables
Known Bugs
None
