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


PHP Tests\FunctionalTestCase類代碼示例

本文整理匯總了PHP中TYPO3\CMS\Core\Tests\FunctionalTestCase的典型用法代碼示例。如果您正苦於以下問題:PHP FunctionalTestCase類的具體用法?PHP FunctionalTestCase怎麽用?PHP FunctionalTestCase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了FunctionalTestCase類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

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

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

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

 /**
  * 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

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

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

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

示例8: tearDown

 protected function tearDown()
 {
     $this->assertErrorLogEntries();
     unset($this->actionService);
     unset($this->recordIds);
     parent::tearDown();
 }
開發者ID:plan2net,項目名稱:TYPO3.CMS,代碼行數:7,代碼來源:AbstractDataHandlerActionTestCase.php

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

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

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

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

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

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

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/core/Tests/Functional/Fixtures/pages.xml');
     $this->importDataSet(__DIR__ . '/Fixtures/fixtures.xml');
     $this->authCode = md5(302 . 'recipient2@example.com');
 }
開發者ID:siwa-pparzer,項目名稱:newsletter,代碼行數:8,代碼來源:AbstractFunctionalTestCase.php


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