Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Scaffold: generate boolean values for checkbox fields

  • Loading branch information...
mrtnzlml committed Jul 31, 2016
1 parent 7b6b3ff commit 7c2624f652e37da04e38c289134491c7a0c7a7a8
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/Scaffold/TestsGenerator.php
@@ -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());

0 comments on commit 7c2624f

Please sign in to comment.
You can’t perform that action at this time.