Phabric icon indicating copy to clipboard operation
Phabric copied to clipboard

entity::clean()

Open everzet opened this issue 14 years ago • 5 comments

As we already have insert...() and update...() methods, i think it would be useful to have a simple method to clean test entity. Like

<?php

$phabric->clean('event');

$phabric->getEntity('event')->clean();

everzet avatar Aug 16 '11 06:08 everzet

Agreed will implement tonight.

benwaine avatar Aug 16 '11 08:08 benwaine

or maybe clear() would be better name

everzet avatar Aug 16 '11 09:08 everzet

I'd suggest reset(), as It should reverse everything done since the last call to reset (or the start).

glenjamin avatar Aug 16 '11 12:08 glenjamin

Added the Gherkin which defines this feature in latest commit (reset-fixture.feature)

benwaine avatar Aug 16 '11 21:08 benwaine

yeah but as you said, the scenario is not passing yet right? will reset reset only the data managed by phabric or will actually reset the whole db? I am of the opinion that there has to be 2 layers at laest, one for suite setup and one for scenario setup ... just a thought @benwaine

cordoval avatar Sep 09 '11 04:09 cordoval