Пример #1
0
 public function testBuildForm()
 {
     $builder = $this->getMockBuilder('Symfony\\Component\\Form\\FormBuilder')->disableOriginalConstructor()->getMock();
     $builder->expects($this->once())->method('addEventSubscriber')->with($this->isInstanceOf('Oro\\Bundle\\SoapBundle\\Form\\EventListener\\PatchSubscriber'));
     $this->configManager->expects($this->exactly(2))->method('get')->with('oro_locale.languages')->will($this->returnValue(['en', 'fr_FR']));
     $this->localeSettings->expects($this->exactly(3))->method('getLanguage')->will($this->returnValue('ru_UA'));
     $this->localeSettings->expects($this->once())->method('getLocalesByCodes')->will($this->returnValue(['en', 'fr_FR']));
     $this->type->buildForm($builder, array());
 }
 public function testBuildForm()
 {
     $builder = $this->getMockBuilder('Symfony\\Component\\Form\\FormBuilder')->disableOriginalConstructor()->getMock();
     $builder->expects($this->once())->method('addEventSubscriber')->with($this->isInstanceOf('Oro\\Bundle\\UserBundle\\Form\\EventListener\\PatchSubscriber'));
     $this->type->buildForm($builder, array());
 }