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


PHP Test\FormIntegrationTestCase类代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->registry = $this->getMockBuilder('OroB2B\\Bundle\\AttributeBundle\\AttributeType\\AttributeTypeRegistry')->getMock();
     $this->registry->expects($this->any())->method('getTypeByName')->will($this->returnValueMap([[Integer::NAME, new Integer()], [Float::NAME, new Float()], [String::NAME, new String()], [Boolean::NAME, new Boolean()], [Text::NAME, new Text()], [Date::NAME, new Date()], [DateTime::NAME, new DateTime()]]));
     $this->formType = new AttributeTypeConstraintType($this->registry);
 }
开发者ID:hafeez3000,项目名称:orocommerce,代码行数:7,代码来源:AttributeTypeConstraintTypeTest.php

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: tearDown

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

示例14: setUp

 protected function setUp()
 {
     parent::setUp();
     $registry = $this->getMockBuilder('OroB2B\\Bundle\\AttributeBundle\\AttributeType\\AttributeTypeRegistry')->getMock();
     $registry->expects($this->any())->method('getTypes')->will($this->returnValue([Integer::NAME => new Integer(), Float::NAME => new Float(), String::NAME => new String(), Boolean::NAME => new Boolean(), Text::NAME => new Text(), Date::NAME => new Date(), DateTime::NAME => new DateTime()]));
     /** @var \OroB2B\Bundle\AttributeBundle\AttributeType\AttributeTypeRegistry $registry */
     $this->formType = new AttributeTypeType($registry);
 }
开发者ID:hafeez3000,项目名称:orocommerce,代码行数:8,代码来源:AttributeTypeTypeTest.php

示例15: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->securityFacade = $this->getMockBuilder('Oro\\Bundle\\SecurityBundle\\SecurityFacade')->disableOriginalConstructor()->getMock();
     $this->formType = new AccountUserType($this->securityFacade);
     $this->formType->setDataClass(self::DATA_CLASS);
     $this->formType->setAddressClass(self::ADDRESS_CLASS);
 }
开发者ID:adam-paterson,项目名称:orocommerce,代码行数:11,代码来源:AccountUserTypeTest.php


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