[Form] Fixed a method name.

1858b96b7d introduced a mocked context and therefore getExecutionContext() is now called getMockExectionContext().
This commit is contained in:
Jakub Zalas 2013-05-09 23:31:20 +01:00
parent e3187590c0
commit ef87ba7913
1 changed files with 4 additions and 5 deletions

View File

@ -293,17 +293,16 @@ class FormValidatorTest extends \PHPUnit_Framework_TestCase
public function testDontExecuteFunctionNames()
{
$context = $this->getExecutionContext();
$graphWalker = $context->getGraphWalker();
$context = $this->getMockExecutionContext();
$object = $this->getMock('\stdClass');
$options = array('validation_groups' => 'header');
$form = $this->getBuilder('name', '\stdClass', $options)
->setData($object)
->getForm();
$graphWalker->expects($this->once())
->method('walkReference')
->with($object, 'header', 'data', true);
$context->expects($this->once())
->method('validate')
->with($object, 'data', 'header', true);
$this->validator->initialize($context);
$this->validator->validate($form, new Form());