public function testBuildView()
 {
     $options = array('tooltip' => 'test', 'tooltip_details_enabled' => true, 'tooltip_details_anchor' => 'test', 'tooltip_details_link' => 'test', 'tooltip_placement' => 'test');
     $view = new FormView();
     $form = $this->getMockBuilder('Symfony\\Component\\Form\\Form')->disableOriginalConstructor()->getMock();
     $extension = new TooltipFormExtension();
     $extension->buildView($view, $form, $options);
     foreach ($options as $option => $value) {
         $this->assertArrayHasKey($option, $view->vars);
         $this->assertEquals($options[$option], $view->vars[$option]);
     }
 }
 public function testParentForm()
 {
     $view = new FormView();
     $this->form->expects($this->any())->method('getParent')->will($this->returnValue(false));
     $translator = $this->getMockBuilder('Oro\\Bundle\\TranslationBundle\\Translation\\Translator')->disableOriginalConstructor()->getMock();
     $extension = new TooltipFormExtension($this->configProvider, $translator);
     $extension->buildView($view, $this->form, ['toolbar' => 'test']);
     $this->assertArrayNotHasKey('toolbar', $view->vars);
 }