當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TypeTestCase::setUp方法代碼示例

本文整理匯總了PHP中Symfony\Component\Form\Test\TypeTestCase::setUp方法的典型用法代碼示例。如果您正苦於以下問題:PHP TypeTestCase::setUp方法的具體用法?PHP TypeTestCase::setUp怎麽用?PHP TypeTestCase::setUp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Symfony\Component\Form\Test\TypeTestCase的用法示例。


在下文中一共展示了TypeTestCase::setUp方法的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()
 {
     if (!class_exists('Symfony\\Component\\Form\\Form')) {
         $this->markTestSkipped('The "Form" component is not available');
     }
     if (!class_exists('Doctrine\\DBAL\\Platforms\\MySqlPlatform')) {
         $this->markTestSkipped('Doctrine DBAL is not available.');
     }
     if (!class_exists('Doctrine\\Common\\Version')) {
         $this->markTestSkipped('Doctrine Common is not available.');
     }
     if (!class_exists('Doctrine\\ORM\\EntityManager')) {
         $this->markTestSkipped('Doctrine ORM is not available.');
     }
     $this->em = DoctrineTestHelper::createTestEntityManager();
     $this->emRegistry = $this->createRegistryMock('default', $this->em);
     parent::setUp();
     $schemaTool = new SchemaTool($this->em);
     $classes = array($this->em->getClassMetadata(self::ITEM_GROUP_CLASS), $this->em->getClassMetadata(self::SINGLE_IDENT_CLASS), $this->em->getClassMetadata(self::SINGLE_STRING_IDENT_CLASS), $this->em->getClassMetadata(self::COMPOSITE_IDENT_CLASS), $this->em->getClassMetadata(self::COMPOSITE_STRING_IDENT_CLASS));
     try {
         $schemaTool->dropSchema($classes);
     } catch (\Exception $e) {
     }
     try {
         $schemaTool->createSchema($classes);
     } catch (\Exception $e) {
     }
 }
開發者ID:neagu-cristian,項目名稱:Jobeet,代碼行數:28,代碼來源:EntityTypeTest.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->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

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

示例7: setUp

 protected function setUp()
 {
     $this->validator = $this->getMock('Symfony\\Component\\Validator\\Validator\\ValidatorInterface');
     $metadata = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata')->disableOriginalConstructor()->getMock();
     $this->validator->expects($this->once())->method('getMetadataFor')->will($this->returnValue($metadata));
     parent::setUp();
 }
開發者ID:Ener-Getick,項目名稱:symfony,代碼行數:7,代碼來源:TypeTestCase.php

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

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

示例10: setUp

    protected function setUp()
    {
        $this->tokenManager = $this->getMockBuilder('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')->getMock();
        $this->translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock();

        parent::setUp();
    }
開發者ID:symfony,項目名稱:symfony,代碼行數:7,代碼來源:FormTypeCsrfExtensionTest.php

示例11: setUp

 public function setUp()
 {
     $this->typeFQCN = method_exists(AbstractType::class, 'getBlockPrefix');
     $this->dm = TestCase::createTestDocumentManager([__DIR__ . '/../../Fixtures/Form/Document']);
     $this->dmRegistry = $this->createRegistryMock('default', $this->dm);
     parent::setUp();
 }
開發者ID:alcaeus,項目名稱:DoctrineMongoDBBundle,代碼行數:7,代碼來源:DocumentTypeTest.php

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

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

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

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


注:本文中的Symfony\Component\Form\Test\TypeTestCase::setUp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。