/** * @depends testWhetherAUniqueFormIdIsBeingAdded * @depends testWhetherASubmitButtonIsAddedWithASubmitLabelBeingSet */ public function testWhetherItIsPossibleToRecreateAForm() { $form = new Form(); $form->setTokenDisabled(); $form->setSubmitLabel('test'); $form->create(); // sets the flag $this->created to true $form->clearElements(); // should reset the flag.. $form->create(); // ..so that we can recreate the form $this->assertCount(2, $form->getElements(), 'Form::clearElements() does not fully reset the form'); }