You are here

public function FormTest::testDisableValidation in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dom-crawler/Tests/FormTest.php \Symfony\Component\DomCrawler\Tests\FormTest::testDisableValidation()

File

vendor/symfony/dom-crawler/Tests/FormTest.php, line 360

Class

FormTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testDisableValidation() {
  $form = $this
    ->createForm('<form>
            <select name="foo[bar]">
                <option value="bar">bar</option>
            </select>
            <select name="foo[baz]">
                <option value="foo">foo</option>
            </select>
            <input type="submit" />
        </form>');
  $form
    ->disableValidation();
  $form['foo[bar]']
    ->select('foo');
  $form['foo[baz]']
    ->select('bar');
  $this
    ->assertEquals('foo', $form['foo[bar]']
    ->getValue(), '->disableValidation() disables validation of all ChoiceFormField.');
  $this
    ->assertEquals('bar', $form['foo[baz]']
    ->getValue(), '->disableValidation() disables validation of all ChoiceFormField.');
}