From 7b6b3ff4b5f4eb4c3872abba010f2ff4a813bed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Zl=C3=A1mal?= Date: Sun, 31 Jul 2016 08:27:08 +0200 Subject: [PATCH] Scaffold: do not add submit buttons into generated test --- src/Scaffold/TestsGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Scaffold/TestsGenerator.php b/src/Scaffold/TestsGenerator.php index 3e8aa19..996fe58 100644 --- a/src/Scaffold/TestsGenerator.php +++ b/src/Scaffold/TestsGenerator.php @@ -127,7 +127,7 @@ public function generateTests($outputFolder) $controls = ''; /** @var \Nette\Application\UI\Form $form */ foreach ($form->getControls() as $control) { - if ($control->getName() === '_token_') { + if ($control->getName() === '_token_' || $control instanceof \Nette\Forms\Controls\SubmitButton) { continue; } $controls .= "\t'" . $control->getName() . "' => '###', //FIXME: replace with value\n";