You are here

public function FormTest::testMultiselectSetValues 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::testMultiselectSetValues()

File

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

Class

FormTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testMultiselectSetValues() {
  $form = $this
    ->createForm('<form><select multiple="multiple" name="multi"><option value="foo">foo</option><option value="bar">bar</option></select><input type="submit" /></form>');
  $form
    ->setValues(array(
    'multi' => array(
      'foo',
      'bar',
    ),
  ));
  $this
    ->assertEquals(array(
    'multi' => array(
      'foo',
      'bar',
    ),
  ), $form
    ->getValues(), '->setValue() sets the values of select');
}