protected function FormTest::getFormFieldMock 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::getFormFieldMock()
7 calls to FormTest::getFormFieldMock()
- FormTest::testFormFieldRegistryAddThrowAnExceptionWhenTheNameIsMalformed in vendor/
symfony/ dom-crawler/ Tests/ FormTest.php - @expectedException \InvalidArgumentException
- FormTest::testFormFieldRegistryHasReturnsTrueWhenTheFQNExists in vendor/
symfony/ dom-crawler/ Tests/ FormTest.php - FormTest::testFormRegistryFieldsCanBeRemoved in vendor/
symfony/ dom-crawler/ Tests/ FormTest.php - FormTest::testFormRegistrySetArrayOnNotCompoundField in vendor/
symfony/ dom-crawler/ Tests/ FormTest.php - @expectedException \InvalidArgumentException @expectedExceptionMessage Unreachable field "0"
- FormTest::testFormRegistrySetValueOnCompoundField in vendor/
symfony/ dom-crawler/ Tests/ FormTest.php - @expectedException \InvalidArgumentException @expectedExceptionMessage Cannot set value on a compound field "foo[bar]".
File
- vendor/
symfony/ dom-crawler/ Tests/ FormTest.php, line 856
Class
Namespace
Symfony\Component\DomCrawler\TestsCode
protected function getFormFieldMock($name, $value = null) {
$field = $this
->getMockBuilder('Symfony\\Component\\DomCrawler\\Field\\FormField')
->setMethods(array(
'getName',
'getValue',
'setValue',
'initialize',
))
->disableOriginalConstructor()
->getMock();
$field
->expects($this
->any())
->method('getName')
->will($this
->returnValue($name));
$field
->expects($this
->any())
->method('getValue')
->will($this
->returnValue($value));
return $field;
}