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


PHP Test\TypeTestCase类代码示例

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


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

示例1: setUp

 /**
  * {@inheritdooc}.
  */
 protected function setUp()
 {
     parent::setUp();
     $params = self::$kernel->getContainer()->get('service_container')->getParameter('fm_tinymce');
     $this->tinyMCEtype = new TinyMCEType($params);
     $this->factory = Forms::createFormFactoryBuilder()->addType($this->tinyMCEtype)->getFormFactory();
 }
开发者ID:helios-ag,项目名称:FMTinyMCEBundle,代码行数:10,代码来源:TinyMCETypeTest.php

示例2: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->typeHelper = $this->getMockBuilder('Oro\\Bundle\\EntityExtendBundle\\Form\\Util\\EnumTypeHelper')->disableOriginalConstructor()->setMethods(['hasEnumCode'])->getMock();
     $this->nameGenerator = new ExtendDbIdentifierNameGenerator();
     $this->type = new EnumNameType($this->typeHelper, $this->nameGenerator);
 }
开发者ID:xamin123,项目名称:platform,代码行数:7,代码来源:EnumNameTypeTest.php

示例3: setUp

 protected function setUp()
 {
     $this->organizacjaRepository = M::mock(OrganizacjaRepository::class);
     $this->tokenStorage = M::mock(TokenStorage::class);
     $this->token = M::mock(UsernamePasswordToken::class);
     parent::setUp();
 }
开发者ID:mgugniewicz,项目名称:dodajurlop,代码行数:7,代码来源:OrganizacjaSimpleTypeTest.php

示例4: setUp

 /**
  * {@inheritdooc}.
  */
 public function setUp()
 {
     parent::setUp();
     $ckeditorType = new CkeditorType($this->get('service_container'));
     $this->factory = Forms::createFormFactoryBuilder()->addType($ckeditorType)->getFormFactory();
     $this->formType = method_exists('Symfony\\Component\\Form\\AbstractType', 'getBlockPrefix') ? 'Trsteel\\CkeditorBundle\\Form\\Type\\CkeditorType' : 'ckeditor';
 }
开发者ID:jbartfay,项目名称:TrsteelCkeditorBundle,代码行数:10,代码来源:CkeditorTypeTest.php

示例5: setUp

 protected function setUp()
 {
     $this->pracownikRepository = M::mock(PracownikRepository::class);
     $this->tokenStorage = M::mock(TokenStorage::class);
     $this->token = M::mock(UsernamePasswordToken::class);
     parent::setUp();
 }
开发者ID:mgugniewicz,项目名称:dodajurlop,代码行数:7,代码来源:PracownikSimpleTypeTest.php

示例6: setUp

 protected function setUp()
 {
     parent::setUp();
     $validator = $this->getMock('\\Symfony\\Component\\Validator\\Validator\\ValidatorInterface');
     $validator->method('validate')->will($this->returnValue(new ConstraintViolationList()));
     $this->factory = Forms::createFormFactoryBuilder()->addExtensions($this->getExtensions())->addTypeExtension(new FormTypeValidatorExtension($validator))->addTypeExtension(new WidgetFormTypeExtension(array('checkbox_label' => 'label')))->getFormFactory();
 }
开发者ID:sumocoders,项目名称:framework-search-bundle,代码行数:7,代码来源:SearchTypeTest.php

示例7: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->factory = Forms::createFormFactoryBuilder()->addExtensions($this->getExtensions())->addTypeExtension(new DateTimeJqueryTypeExtension())->addTypeExtension(new DateJqueryTypeExtension())->addTypeExtension(new BirthdayJqueryTypeExtension())->getFormFactory();
     $this->dispatcher = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
     $this->builder = new FormBuilder(null, null, $this->dispatcher, $this->factory);
 }
开发者ID:mcdir,项目名称:SonatraFormExtensionsBundle,代码行数:7,代码来源:BirthdayJqueryTypeExtensionTest.php

示例8: setUp

 protected function setUp()
 {
     // we test against different locales, so we need the full
     // implementation
     IntlTestHelper::requireFullIntl($this);
     parent::setUp();
 }
开发者ID:xingshanghe,项目名称:symfony,代码行数:7,代码来源:MoneyTypeTest.php

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     $this->securityFacade = $this->getMockBuilder('Oro\\Bundle\\SecurityBundle\\SecurityFacade')->disableOriginalConstructor()->getMock();
     $this->relatedEmailsProvider = $this->getMockBuilder('Oro\\Bundle\\EmailBundle\\Provider\\RelatedEmailsProvider')->disableOriginalConstructor()->getMock();
     $this->mailboxManager = $this->getMockBuilder('Oro\\Bundle\\EmailBundle\\Entity\\Manager\\MailboxManager')->disableOriginalConstructor()->getMock();
 }
开发者ID:woei66,项目名称:platform,代码行数:7,代码来源:EmailAddressFromTypeTest.php

示例10: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     $this->entityConfigMock = $this->getMockBuilder(EntityConfigHelper::class)->disableOriginalConstructor()->getMock();
     $this->extendTypeGuesser = $this->getMockBuilder(FormTypeGuesserInterface::class)->disableOriginalConstructor()->getMock();
     $this->regularTypeGuesser = $this->getMock(FormTypeGuesserInterface::class);
     parent::setUp();
 }
开发者ID:trustify,项目名称:oroplatform-mass-update-bundle,代码行数:10,代码来源:GuessFieldTypeTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     $this->repo = $this->getMockBuilder('Acts\\CamdramBundle\\Entity\\SocietyRepository')->disableOriginalConstructor()->setMethods(array('findOneByName', 'findOneBy'))->getMock();
     $this->em = $this->getMockBuilder('Doctrine\\ORM\\EntityManager')->disableOriginalConstructor()->getMock();
     $this->em->expects($this->any())->method('getRepository')->will($this->returnValue($this->repo));
 }
开发者ID:dstansby,项目名称:camdram,代码行数:7,代码来源:EntitySearchTypeTest.php

示例12: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->translator = $this->getMock('Symfony\\Component\\Translation\\TranslatorInterface');
     $this->doctrine = $this->getMockBuilder('Doctrine\\Common\\Persistence\\ManagerRegistry')->disableOriginalConstructor()->getMock();
     $this->type = new EnumFilterType($this->translator, $this->doctrine);
 }
开发者ID:xamin123,项目名称:platform,代码行数:7,代码来源:EnumFilterTypeTest.php

示例13: setUp

 protected function setUp()
 {
     parent::setUp();
     $validator = new Validator(new ClassMetadataFactory(new LoaderChain([])), new ConstraintValidatorFactory(), new DefaultTranslator());
     $this->factory = Forms::createFormFactoryBuilder()->addTypeExtension(new DataBlockExtension())->addTypeExtension(new FormTypeValidatorExtension($validator))->getFormFactory();
     $this->type = new EntityType(new ExtendDbIdentifierNameGenerator());
 }
开发者ID:Maksold,项目名称:platform,代码行数:7,代码来源:EntityTypeTest.php

示例14: setUp

 protected function setUp()
 {
     parent::setUp();
     // we test against "de_DE", so we need the full implementation
     IntlTestHelper::requireFullIntl($this);
     \Locale::setDefault('de_DE');
 }
开发者ID:xingshanghe,项目名称:symfony,代码行数:7,代码来源:NumberTypeTest.php

示例15: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->translator = $this->getMock('Symfony\\Component\\Translation\\TranslatorInterface');
     $this->provider = $this->getMockBuilder('Oro\\Bundle\\EntityExtendBundle\\Provider\\EnumValueProvider')->disableOriginalConstructor()->getMock();
     $this->type = new EnumFilterType($this->translator, $this->provider);
 }
开发者ID:ramunasd,项目名称:platform,代码行数:7,代码来源:EnumFilterTypeTest.php


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