<p>Is it possible to have a fixture change between test methods? If so, how can I do this? </p>

<p>My syntax for this problem : </p>

<p>In the cakephp framework i am building tests for a behavior that is configured by adding fields to the table. This is intended to work in the same way that adding the "created" 
and "modified" fields will auto-populate these fields on save.</p>

<p>To test this I <em>could</em> create dozens of fixtures/model combos to test the different setups, but it would be a hundred times better, faster and easier to just have the fixture change "shape" between test methods. </p>

<blockquote>
  <p>If you are not familiar with the <a href="http://cakephp.org" rel="nofollow noreferrer">CakePHP framework</a>, you can maybe still help me as it uses <a href="http://simletest.org" rel="nofollow noreferrer">SimpleTest</a></p>
</blockquote>

<p><em>Edit: rephrased question to be more general</em></p>

[{'answer_id': 38725, 'author': 'Till', 'author_id': 2859, 'author_profile': 'https://Stackoverflow.com/users/2859', 'pm_score': 2, 'selected': False, 'text': '<p>Last time I checked, you could use the <a href="http://developers.sugarcrm.com/tutorials/Customizing_Sugar/4/" rel="nofollow noreferrer">module builder</a> to extend the interface. From 5.0 (or maybe 4.x) on, Sugar added all those APIs, which should enable you to extend SugarCRM without hacking it in and losing it with the next upgrade.</p>\n\n<p>Hope that helps!</p>\n'}, {'answer_id': 1847472, 'author': 'michael', 'author_id': 186713, 'author_profile': 'https://Stackoverflow.com/users/186713', 'pm_score': 1, 'selected': False, 'text': '<p>You can create a new module - Invoices using Module Builder and then add relations between Accounts and Invoices. The subpanels will appear for both - Accounts and Invoices without any coding. You should just customize the columns again using Module Builder. </p>\n'}, {'answer_id': 3958464, 'author': 'Eitrix', 'author_id': 521216, 'author_profile': 'https://Stackoverflow.com/users/521216', 'pm_score': 1, 'selected': False, 'text': '<p>as stated above, create invoices module to hold all your invoices, but before doing import make relationship with accounts and map the account field when importing so the invoice is automatically connect in subpanel and shown</p>\n'}, {'answer_id': 8543521, 'author': 'Craig Robertson', 'author_id': 899371, 'author_profile': 'https://Stackoverflow.com/users/899371', 'pm_score': 0, 'selected': False, 'text': '<p>Basically, the Account name should be a related field in your new invoices module (base the module creation on something like QUOTES that has similar fields. Once you create the module (so simple you can almost guess your way through it in the ADMIN section) and the fields you like (using Studio) just add the RELATED field Account Name and the sub-panel will be established in your ACCOUNTS module and the invoice will magically populate, especially if you re-install them using the import feature from a CSV file (spreadsheet).</p>\n'}, {'answer_id': 13640521, 'author': 'Milind', 'author_id': 1232433, 'author_profile': 'https://Stackoverflow.com/users/1232433', 'pm_score': 0, 'selected': False, 'text': '<p>You can create sub-panels in account modules details view by just giving relationship within two modules. Create a one-to-many relationship from Account module to Invoices module. </p>\n'}]
['https://Stackoverflow.com/questions/37785', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4013/']