当前位置: 首页>>代码示例>>PHP>>正文


PHP FormIntegrationTestCase::setUp方法代码示例

本文整理汇总了PHP中Symfony\Component\Form\Test\FormIntegrationTestCase::setUp方法的典型用法代码示例。如果您正苦于以下问题:PHP FormIntegrationTestCase::setUp方法的具体用法?PHP FormIntegrationTestCase::setUp怎么用?PHP FormIntegrationTestCase::setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\Form\Test\FormIntegrationTestCase的用法示例。


在下文中一共展示了FormIntegrationTestCase::setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 protected function setUp()
 {
     parent::setUp();
     $configManager = $this->getMockBuilder('Oro\\Bundle\\ConfigBundle\\Config\\ConfigManager')->disableOriginalConstructor()->getMock();
     $translatorInterface = $this->getMockBuilder('Symfony\\Component\\Translation\\TranslatorInterface')->disableOriginalConstructor()->getMock();
     $this->formType = new OroSimpleColorPickerType($configManager, $translatorInterface);
 }
开发者ID:ramunasd,项目名称:platform,代码行数:7,代码来源:OroSimpleColorPickerTypeTest.php

示例2: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->type = new FrontendLineItemType();
     $this->type->setDataClass(self::DATA_CLASS);
     $this->type->setLineItemSubscriber($this->getLineItemSubscriber());
 }
开发者ID:adam-paterson,项目名称:orocommerce,代码行数:10,代码来源:FrontendLineItemTypeTest.php

示例3: setUp

 /**
  * {@inheritDoc}
  */
 protected function setUp()
 {
     $this->roundingService = $this->getMockBuilder('OroB2B\\Bundle\\ProductBundle\\Rounding\\RoundingService')->disableOriginalConstructor()->getMock();
     $this->type = new ProductType($this->roundingService);
     $this->type->setDataClass(self::DATA_CLASS);
     parent::setUp();
 }
开发者ID:hafeez3000,项目名称:orocommerce,代码行数:10,代码来源:ProductTypeTest.php

示例4: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->localeSettings = $this->getMockBuilder('Oro\\Bundle\\LocaleBundle\\Model\\LocaleSettings')->disableOriginalConstructor()->setMethods(array('getLocale', 'getCurrency', 'getCurrencySymbolByCurrency'))->getMock();
     $this->numberFormatter = $this->getMockBuilder('Oro\\Bundle\\LocaleBundle\\Formatter\\NumberFormatter')->disableOriginalConstructor()->setMethods(array('isCurrencySymbolPrepend', 'getAttribute'))->getMock();
     $this->formType = new OroMoneyType($this->localeSettings, $this->numberFormatter);
 }
开发者ID:Maksold,项目名称:platform,代码行数:7,代码来源:OroMoneyTypeTest.php

示例5: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->formType = new AccountGroupType();
     $this->formType->setDataClass(self::DATA_CLASS);
     $this->formType->setAccountClass(self::ACCOUNT_CLASS);
 }
开发者ID:adam-paterson,项目名称:orocommerce,代码行数:10,代码来源:AccountGroupTypeTest.php

示例6: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $translator = $this->createTranslatorMock();
     $this->formType = new AccountTypedAddressWithDefaultType($translator);
     $this->formType->setRegistry($this->registry);
 }
开发者ID:adam-paterson,项目名称:orocommerce,代码行数:10,代码来源:AccountTypedAddressWithDefaultTypeTest.php

示例7: setUp

 protected function setUp()
 {
     parent::setUp();
     $configManager = $this->getMockBuilder('Oro\\Bundle\\ConfigBundle\\Config\\ConfigManager')->disableOriginalConstructor()->getMock();
     $configManager->expects($this->any())->method('get')->will($this->returnValue(['#FFFFFF', '#000000']));
     $this->formType = new OroSimpleColorChoiceType($configManager);
 }
开发者ID:Maksold,项目名称:platform,代码行数:7,代码来源:OroSimpleColorChoiceTypeTest.php

示例8: setUp

 protected function setUp()
 {
     $this->configProvider = $this->getMockBuilder('\\Oro\\Bundle\\ChartBundle\\Model\\ConfigProvider')->disableOriginalConstructor()->getMock();
     $this->configProvider->expects($this->once())->method('getChartConfigs')->will($this->returnValue(['line_chart' => ['data_schema' => [['label' => 'label', 'name' => 'name', 'required' => false]]]]));
     $this->type = new ReportChartSchemaCollectionType($this->configProvider);
     parent::setUp();
 }
开发者ID:Maksold,项目名称:platform,代码行数:7,代码来源:ReportChartSchemaCollectionTypeTest.php

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     $this->tokenStorage = $this->getMockForAbstractClass('Symfony\\Component\\Security\\Core\\TokenStorageInterface');
     $this->token = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface')->disableOriginalConstructor()->getMock();
     $this->subscriber = new ChangePasswordSubscriber($this->factory, $this->tokenStorage);
 }
开发者ID:aml-bendall,项目名称:ExpandAkeneoApi,代码行数:7,代码来源:ChangePasswordSubscriberTest.php

示例10: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->locale = \Locale::getDefault();
     \Locale::setDefault('en');
     $this->formType = new OroPercentType();
 }
开发者ID:Maksold,项目名称:platform,代码行数:7,代码来源:OroPercentTypeTest.php

示例11: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->formType = new CustomerGroupType();
     $this->formType->setDataClass(self::DATA_CLASS);
     $this->formType->setCustomerClass(self::CUSTOMER_CLASS);
 }
开发者ID:hafeez3000,项目名称:orocommerce,代码行数:10,代码来源:CustomerGroupTypeTest.php

示例12: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->formType = new CustomerTypedAddressType();
     $this->formType->setAddressTypeDataClass('Oro\\Bundle\\AddressBundle\\Entity\\AddressType');
     $this->formType->setDataClass('OroB2B\\Bundle\\CustomerBundle\\Entity\\CustomerAddress');
 }
开发者ID:hafeez3000,项目名称:orocommerce,代码行数:10,代码来源:CustomerTypedAddressTypeTest.php

示例13: setUp

 protected function setUp()
 {
     $this->locale = \Locale::getDefault();
     parent::setUp();
     $this->cmMock = $this->getMockBuilder('Oro\\Bundle\\ConfigBundle\\Config\\ConfigManager')->disableOriginalConstructor()->getMock();
     $this->formType = new LanguageType($this->cmMock);
 }
开发者ID:Maksold,项目名称:platform,代码行数:7,代码来源:LanguageTypeTest.php

示例14: setUp

 /**
  * @throws \Twig_Error_Loader
  */
 protected function setUp()
 {
     // Setup factory for tabs
     $this->tabFactory = Forms::createFormFactory();
     parent::setUp();
     $rendererEngine = new TwigRendererEngine(array('form_div_layout.html.twig', 'fields.html.twig'));
     if (interface_exists('Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface')) {
         $csrfProviderInterface = 'Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface';
     } else {
         $csrfProviderInterface = 'Symfony\\Component\\Form\\Extension\\Csrf\\CsrfProvider\\CsrfProviderInterface';
     }
     $renderer = new TwigRenderer($rendererEngine, $this->getMock($csrfProviderInterface));
     $this->extension = new FormExtension($renderer);
     $reflection = new \ReflectionClass($renderer);
     $bridgeDirectory = dirname($reflection->getFileName()) . '/../Resources/views/Form';
     $loader = new \Twig_Loader_Filesystem(array($bridgeDirectory, __DIR__ . '/../../Resources/views/Form'));
     $loader->addPath(__DIR__ . '/../../Resources/views', 'MopaBootstrap');
     $environment = new Twig_Environment($loader, array('strict_variables' => true));
     $environment->addExtension(new TranslationExtension(new StubTranslator()));
     $environment->addExtension(new IconExtension('fontawesome'));
     $environment->addExtension(new FormExtension2());
     $environment->addGlobal('global', '');
     $environment->addExtension($this->extension);
     $this->extension->initRuntime($environment);
 }
开发者ID:hirenbhut93,项目名称:MopaBootstrapBundle,代码行数:28,代码来源:AbstractDivLayoutTest.php

示例15: setUp

 protected function setUp()
 {
     parent::setUp();
     $genderProvider = $this->getMockBuilder('Oro\\Bundle\\UserBundle\\Provider\\GenderProvider')->disableOriginalConstructor()->setMethods(array('getChoices'))->getMock();
     $genderProvider->expects($this->any())->method('getChoices')->will($this->returnValue($this->genderChoices));
     $this->type = new GenderType($genderProvider);
 }
开发者ID:Maksold,项目名称:platform,代码行数:7,代码来源:GenderTypeTest.php


注:本文中的Symfony\Component\Form\Test\FormIntegrationTestCase::setUp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。