FixtureHelper for Yii Framework
FixtureHelper is a command application lets you work with your fixtures outside testing. Currently what it does is just helping you to load you fixtures from your fixture files to your database, without the need to invoke PHPUnit.
Copy FixtureHelperCommand.php and place it under protected/extensions/fixtureHelper/
Edit protected/config/console.php, add the following to the config array under
first dimension:
'commandMap' => array(
'fixture' => array(
'class'=>'application.extensions.fixtureHelper.FixtureHelperCommand',
),
),
Configure your database by setting up your db under components.
Add the following inside components.
'fixture'=>array(
'class'=>'system.test.CDbFixtureManager',
),
fixture load [--alias=folderalias] --table=tablename1[,tablename2[,...]]
yiic fixture load --alias=application.modules.mymodule --tables=fruit,transport,country
Total 4 comments
this extension does not deactive db consistency checking, this can result in db errors while loading a fixture. i have send a fix in github.
the github version also has code for loading all existing fixtures.
To the first person who downloaded this extension, please replace it with the one I just uploaded.
Requires Yii 1.1.5
https://github.com/sumwai/fixtureHelper
Leave a comment
Please login to leave your comment.