You are here

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

File

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

Class

FormTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testAll() {
  $form = $this
    ->createForm('<form method="post"><input type="text" name="bar" value="bar" /><input type="submit" /></form>');
  $fields = $form
    ->all();
  $this
    ->assertCount(1, $fields, '->all() return an array of form field objects');
  $this
    ->assertInstanceOf('Symfony\\Component\\DomCrawler\\Field\\InputFormField', $fields['bar'], '->all() return an array of form field objects');
}