protected function FormTest::createForm in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/dom-crawler/Tests/FormTest.php \Symfony\Component\DomCrawler\Tests\FormTest::createForm()
25 calls to FormTest::createForm()
- FormTest::testAll in vendor/
symfony/ dom-crawler/ Tests/ FormTest.php - FormTest::testConstructor in vendor/
symfony/ dom-crawler/ Tests/ FormTest.php - @dataProvider provideInitializeValues
- FormTest::testDisableValidation in vendor/
symfony/ dom-crawler/ Tests/ FormTest.php - FormTest::testGet in vendor/
symfony/ dom-crawler/ Tests/ FormTest.php - FormTest::testGetFiles in vendor/
symfony/ dom-crawler/ Tests/ FormTest.php
File
- vendor/
symfony/ dom-crawler/ Tests/ FormTest.php, line 880
Class
Namespace
Symfony\Component\DomCrawler\TestsCode
protected function createForm($form, $method = null, $currentUri = null) {
$dom = new \DOMDocument();
$dom
->loadHTML('<html>' . $form . '</html>');
$xPath = new \DOMXPath($dom);
$nodes = $xPath
->query('//input | //button');
if (null === $currentUri) {
$currentUri = 'http://example.com/';
}
return new Form($nodes
->item($nodes->length - 1), $currentUri, $method);
}