[Form] Fixed a method name.
1858b96b7d
introduced a mocked context and therefore getExecutionContext() is now called getMockExectionContext().
This commit is contained in:
parent
e3187590c0
commit
ef87ba7913
@ -293,17 +293,16 @@ class FormValidatorTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testDontExecuteFunctionNames()
|
public function testDontExecuteFunctionNames()
|
||||||
{
|
{
|
||||||
$context = $this->getExecutionContext();
|
$context = $this->getMockExecutionContext();
|
||||||
$graphWalker = $context->getGraphWalker();
|
|
||||||
$object = $this->getMock('\stdClass');
|
$object = $this->getMock('\stdClass');
|
||||||
$options = array('validation_groups' => 'header');
|
$options = array('validation_groups' => 'header');
|
||||||
$form = $this->getBuilder('name', '\stdClass', $options)
|
$form = $this->getBuilder('name', '\stdClass', $options)
|
||||||
->setData($object)
|
->setData($object)
|
||||||
->getForm();
|
->getForm();
|
||||||
|
|
||||||
$graphWalker->expects($this->once())
|
$context->expects($this->once())
|
||||||
->method('walkReference')
|
->method('validate')
|
||||||
->with($object, 'header', 'data', true);
|
->with($object, 'data', 'header', true);
|
||||||
|
|
||||||
$this->validator->initialize($context);
|
$this->validator->initialize($context);
|
||||||
$this->validator->validate($form, new Form());
|
$this->validator->validate($form, new Form());
|
||||||
|
Reference in New Issue
Block a user