Example #1
0
 public function testFinishViewShouldAddHideClassAndNotOverrideOld()
 {
     $mainView = new FormView();
     $ownerView = new FormView($mainView);
     $mainView->children['owner'] = $ownerView;
     $ownerView->vars = ['choices' => [], 'attr' => ['class' => 'testClass']];
     $this->type->finishView($mainView, $this->getMock('Symfony\\Component\\Form\\Test\\FormInterface'), []);
     $this->assertContains('hide', $ownerView->vars['attr']['class']);
     $this->assertContains('testClass', $ownerView->vars['attr']['class']);
 }