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


PHP FunctionalTestCase::setUp方法代码示例

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


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

示例1: setUp

 /**
  * Setup
  *
  * @throws \TYPO3\CMS\Core\Tests\Exception
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     $this->categoryRepository = $this->objectManager->get('DERHANSEN\\SfEventMgt\\Domain\\Repository\\CategoryRepository');
     $this->importDataSet(__DIR__ . '/../Fixtures/sys_category.xml');
 }
开发者ID:derhansen,项目名称:sf_event_mgt,代码行数:13,代码来源:CategoryRepositoryTest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     $this->categoryRepository = $this->objectManager->get('Tx_News_Domain_Repository_NewsRepository');
     $this->importDataSet(__DIR__ . '/../Fixtures/tx_news_domain_model_category.xml');
 }
开发者ID:woehrlag,项目名称:Intranet,代码行数:7,代码来源:CategoryRepositoryTest.php

示例3: setUp

 /**
  * Set up
  */
 protected function setUp()
 {
     parent::setUp();
     $this->setUpBackendUserFromFixture(1);
     \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->initializeLanguageObject();
     $this->importDataSet(__DIR__ . '/../Fixtures/sys_workspace.xml');
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:10,代码来源:WorkspaceServiceTest.php

示例4: setUp

 /**
  * Sets up this test suite.
  */
 public function setUp()
 {
     parent::setUp();
     $this->objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     $this->persistentManager = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager');
     $this->blogRepository = $this->objectManager->get('ExtbaseTeam\\BlogExample\\Domain\\Repository\\BlogRepository');
 }
开发者ID:samuweiss,项目名称:TYPO3-Site,代码行数:10,代码来源:AddTest.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     $this->importDataSet(__DIR__ . '/../Fixtures/pages.xml');
     $this->importDataSet(__DIR__ . '/../Fixtures/news.xml');
     $this->importDataSet(__DIR__ . '/../Fixtures/events.xml');
 }
开发者ID:markussom,项目名称:sitemap_generator,代码行数:7,代码来源:SitemapControllerTest.php

示例6: setUp

 /**
  * Setup
  *
  * @throws \TYPO3\CMS\Core\Tests\Exception
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     $this->locationRepository = $this->objectManager->get('DERHANSEN\\SfEventMgt\\Domain\\Repository\\LocationRepository');
     $this->importDataSet(__DIR__ . '/../Fixtures/tx_sfeventmgt_domain_model_location.xml');
 }
开发者ID:derhansen,项目名称:sf_event_mgt,代码行数:13,代码来源:LocationRepositoryTest.php

示例7: setUp

 /**
  * Set up dependencies
  */
 public function setUp()
 {
     parent::setUp();
     $this->objectManager = GeneralUtility::makeInstance(ObjectManager::class);
     $this->queue = $this->objectManager->get(BeanstalkdQueue::class, self::QUEUE_NAME, []);
     /** @var Pheanstalk\Pheanstalk $client */
     $client = $this->queue->getClient();
     // flush queue:
     try {
         while (true) {
             $job = $client->peekDelayed(self::QUEUE_NAME);
             $client->delete($job);
         }
     } catch (\Exception $e) {
     }
     try {
         while (true) {
             $job = $client->peekBuried(self::QUEUE_NAME);
             $client->delete($job);
         }
     } catch (\Exception $e) {
     }
     try {
         while (true) {
             $job = $client->peekReady(self::QUEUE_NAME);
             $client->delete($job);
         }
     } catch (\Exception $e) {
     }
 }
开发者ID:r3h6,项目名称:TYPO3.EXT.jobqueue_beanstalkd,代码行数:33,代码来源:BeanstalkdQueueTest.php

示例8: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->importDataSet(__DIR__ . '/../Fixtures/pages.xml');
     $this->pageRepo = new PageRepository();
     $this->pageRepo->init(false);
 }
开发者ID:graurus,项目名称:testgit_t37,代码行数:7,代码来源:PageRepositoryTest.php

示例9: setUp

 /**
  * Sets up this test suite.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->objectManager = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
     $this->persistentManager = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class);
     $this->blogRepository = $this->objectManager->get(\ExtbaseTeam\BlogExample\Domain\Repository\BlogRepository::class);
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:10,代码来源:AddTest.php

示例10: setUp

 /**
  * Sets up this test suite.
  */
 public function setUp()
 {
     parent::setUp();
     $this->setUpBackendUserFromFixture(1);
     $this->importDataSet(ORIGINAL_ROOT . 'typo3conf/ext/linkhandler/Tests/Functional/Fixtures/base_structure.xml');
     $this->importDataSet(ORIGINAL_ROOT . 'typo3conf/ext/linkhandler/Tests/Functional/Fixtures/tx_news_domain_model_news.xml');
     /** @var \TYPO3\CMS\Lang\LanguageService $languageService */
     $languageService = $this->getMock('TYPO3\\CMS\\Lang\\LanguageService');
     $GLOBALS['LANG'] = $languageService;
     /** @var \TYPO3\CMS\Core\TimeTracker\TimeTracker $timeTracker */
     $timeTracker = $this->getMock('TYPO3\\CMS\\Core\\TimeTracker\\TimeTracker');
     $GLOBALS['TT'] = $timeTracker;
     /** @var \TYPO3\CMS\Frontend\Page\PageRepository $pageRepository */
     $pageRepository = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
     /** @var \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController $typoScriptFrontendController */
     $typoScriptFrontendController = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], 1, 0);
     $this->typoScriptFrontendController = $typoScriptFrontendController;
     $GLOBALS['TSFE'] = $typoScriptFrontendController;
     $typoScriptFrontendController->sys_page = $pageRepository;
     $typoScriptFrontendController->getPageAndRootline();
     $typoScriptFrontendController->initTemplate();
     $typoScriptFrontendController->getConfigArray();
     // This is needed for the configuration manager to load the correct TSconfig.
     $_GET['P'] = array('pid' => 1);
     /** @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObjectRenderer */
     $contentObjectRenderer = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
     $contentObjectRenderer->start(array());
     $this->objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     /** @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManager $configurationManager */
     $configurationManager = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager');
     $configurationManager->setContentObject($contentObjectRenderer);
     $this->uriBuilder = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder');
 }
开发者ID:frans-beech-it,项目名称:linkhandler,代码行数:36,代码来源:UriBuilderTest.php

示例11: setUp

 /**
  * @return void
  */
 public function setUp()
 {
     $this->objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     parent::setUp();
     //this is needed by the TYPO3 core.
     chdir(PATH_site);
 }
开发者ID:sitegeist,项目名称:ext-solr,代码行数:10,代码来源:IntegrationTest.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
     $this->importDataSet(__DIR__ . '/Fixtures/fixtures.xml');
     $this->authCode = md5(302 . 'recipient2@example.com');
 }
开发者ID:ecodev,项目名称:newsletter,代码行数:7,代码来源:AbstractFunctionalTestCase.php

示例13: setUp

 public function setUp()
 {
     parent::setUp();
     $GLOBALS['LANG'] = GeneralUtility::makeInstance('TYPO3\\CMS\\Lang\\LanguageService');
     $GLOBALS['LANG']->init('default');
     $this->packageManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Package\\PackageManager');
 }
开发者ID:ichhabrecht,项目名称:integrity,代码行数:7,代码来源:ExtensionInformationRepositoryTest.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $this->objectManager = GeneralUtility::makeInstance(ObjectManager::class);
     $this->queue = $this->objectManager->get(DatabaseQueue::class, self::QUEUE_NAME, ['timeout' => 0]);
     $this->setUpBasicFrontendEnvironment();
 }
开发者ID:r3h6,项目名称:TYPO3.EXT.jobqueue_database,代码行数:7,代码来源:DatabaseQueueTest.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     $this->objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     $this->newsRepository = $this->objectManager->get('GeorgRinger\\News\\Domain\\Repository\\NewsRepository');
     $this->importDataSet(__DIR__ . '/../Fixtures/tx_news_domain_model_news.xml');
 }
开发者ID:r3h6,项目名称:news,代码行数:7,代码来源:NewsRepositoryTest.php


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