public function testSetters()
 {
     $formConfig = $this->getMock('Symfony\\Component\\Form\\FormConfigInterface');
     $formView = new FormView();
     $formView->vars['multipart'] = true;
     $form = $this->getMock('Symfony\\Component\\Form\\Test\\FormInterface');
     $form->expects($this->any())->method('getConfig')->will($this->returnValue($formConfig));
     $form->expects($this->once())->method('createView')->will($this->returnValue($formView));
     $this->container->expects($this->once())->method('get')->with(self::FORM_SERVICE_ID)->will($this->returnValue($form));
     $formAccessor = new DependencyInjectionFormAccessor($this->container, self::FORM_SERVICE_ID);
     $action = FormAction::createByRoute('test_route', ['foo' => 'bar']);
     $formAccessor->setAction($action);
     $this->assertEquals($action, $formAccessor->getAction());
     $formAccessor->setActionRoute('test_route', []);
     $this->assertEquals(FormAction::createByRoute('test_route', []), $formAccessor->getAction());
     $formAccessor->setMethod('post');
     $this->assertEquals('post', $formAccessor->getMethod());
     $formAccessor->setEnctype('multipart/form-data');
     $this->assertEquals('multipart/form-data', $formAccessor->getEnctype());
 }
 public function testProcessedFields()
 {
     $formAccessor = new DependencyInjectionFormAccessor($this->container, self::FORM_SERVICE_ID);
     $this->assertNull($formAccessor->getProcessedFields());
     $processedFields = ['field' => 'block_id'];
     $formAccessor->setProcessedFields($processedFields);
     $this->assertSame($processedFields, $formAccessor->getProcessedFields());
 }