* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Tests\Component\DomCrawler; use Symfony\Component\DomCrawler\Form; use Symfony\Component\DomCrawler\FormFieldRegistry; use Symfony\Component\DomCrawler\Field; class FormTest extends \PHPUnit_Framework_TestCase { public static function setUpBeforeClass() { // Ensure that the private helper class FormFieldRegistry is loaded class_exists('Symfony\\Component\\DomCrawler\\Form'); } public function testConstructorThrowsExceptionIfTheNodeHasNoFormAncestor() { $dom = new \DOMDocument(); $dom->loadHTML('