You are here

public function FormTest::testConstructor in Zircon Profile 8.0

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

@dataProvider provideInitializeValues

File

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

Class

FormTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testConstructor($message, $form, $values) {
  $form = $this
    ->createForm('<form>' . $form . '</form>');
  $this
    ->assertEquals($values, array_map(function ($field) {
    $class = get_class($field);
    return array(
      substr($class, strrpos($class, '\\') + 1),
      $field
        ->getValue(),
    );
  }, $form
    ->all()), '->getDefaultValues() ' . $message);
}