This should be an easy one but I can't find the answer anywhere. I'm using Symfony 2 with phpunit to test my code. Its easy enough to get phpunit to tick a checkbox while running tests:
$form['mycompanyname_companybundle_editsomethingtype[locked]']->tick();
But how do I get it to 'untick' a checkbox?
You can use Symfony\Component\DomCrawler\Field\ChoiceFormField::untick()
for that. In your case it would be
$form['mycompanyname_companybundle_editsomethingtype[locked]']->untick();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With