You are here

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

File

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

Class

FormTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testOffsetExists() {
  $form = $this
    ->createForm('<form><input type="text" name="foo" value="foo" /><input type="submit" /></form>');
  $this
    ->assertTrue(isset($form['foo']), '->offsetExists() return true if the field exists');
  $this
    ->assertFalse(isset($form['bar']), '->offsetExists() return false if the field does not exist');
}