Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
Scaffold: generate boolean values for checkbox fields
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtnzlml committed Jul 31, 2016
1 parent 7b6b3ff commit 7c2624f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Scaffold/TestsGenerator.php
Expand Up @@ -130,7 +130,11 @@ public function generateTests($outputFolder)
if ($control->getName() === '_token_' || $control instanceof \Nette\Forms\Controls\SubmitButton) {
continue;
}
$controls .= "\t'" . $control->getName() . "' => '###', //FIXME: replace with value\n";
$value = "'###', //FIXME: replace with value";
if ($control instanceof \Nette\Forms\Controls\Checkbox) {
$value = 'FALSE';
}
$controls .= "\t'" . $control->getName() . "' => $value\n";
}
try {
$form->onSuccess($form, $form->getValues());
Expand Down

0 comments on commit 7c2624f

Please sign in to comment.