php TYPO3-CMS-Core-Tests-FunctionalTestCase类(方法)实例源码

下面列出了php TYPO3-CMS-Core-Tests-FunctionalTestCase 类(方法)源码代码实例,从而了解它的用法。

作者:r3h    项目:new   
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');
 }

作者:grauru    项目:testgit_t3   
protected function setUp()
 {
     parent::setUp();
     $this->importDataSet(__DIR__ . '/../Fixtures/pages.xml');
     $this->pageRepo = new PageRepository();
     $this->pageRepo->init(false);
 }

作者:plan2ne    项目:TYPO3.CM   
/**
  * Set up
  */
 protected function setUp()
 {
     parent::setUp();
     $this->setUpBackendUserFromFixture(1);
     \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->initializeLanguageObject();
     $this->importDataSet(__DIR__ . '/../Fixtures/sys_workspace.xml');
 }

作者:r3h    项目:TYPO3.EXT.jobqueue_beanstalk   
/**
  * 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) {
     }
 }

作者:woehrla    项目:Intrane   
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');
 }

作者:ecode    项目:newslette   
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');
 }

作者:markusso    项目:sitemap_generato   
public function setUp()
 {
     parent::setUp();
     $this->importDataSet(__DIR__ . '/../Fixtures/pages.xml');
     $this->importDataSet(__DIR__ . '/../Fixtures/news.xml');
     $this->importDataSet(__DIR__ . '/../Fixtures/events.xml');
 }

作者:plan2ne    项目:TYPO3.CM   
protected function tearDown()
 {
     $this->assertErrorLogEntries();
     unset($this->actionService);
     unset($this->recordIds);
     parent::tearDown();
 }

作者:derhanse    项目:sf_event_mg   
/**
  * 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');
 }

作者:sitegeis    项目:ext-sol   
/**
  * @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);
 }

作者:plan2ne    项目:TYPO3.CM   
/**
  * 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);
 }

作者:samuweis    项目:TYPO3-Sit   
/**
  * 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');
 }

作者:derhanse    项目:sf_event_mg   
/**
  * 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');
 }

作者:frans-beech-i    项目:linkhandle   
/**
  * 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');
 }

作者:siwa-pparze    项目:newslette   
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');
 }

作者:kpurrman    项目:typo3-kesearch-categorie   
public function setUp()
 {
     parent::setUp();
     $this->importDataSet(__DIR__ . '/Fixtures/Database/pages.xml');
     $this->importDataSet(__DIR__ . '/Fixtures/Database/sys_category.xml');
     $this->importDataSet(__DIR__ . '/Fixtures/Database/sys_category_record_mm.xml');
     $this->setUpFrontendRootPage(1, array('EXT:kesearch_categories/Tests/Functional/Fixtures/Frontend/Basic.ts'));
 }

作者:rickymathe    项目:TYPO3.CM   
protected function setUp()
 {
     parent::setUp();
     $this->importDataSet(__DIR__ . '/fixtures.xml');
     $this->tsFrontendController = $this->getAccessibleMock(TypoScriptFrontendController::class, array('dummy'), array(), '', false);
     $pageContextMock = $this->getMock(\TYPO3\CMS\Frontend\Page\PageRepository::class);
     $this->tsFrontendController->_set('sys_page', $pageContextMock);
 }

作者:TYPO3Incubato    项目:TYPO3.CM   
/**
  * Set up for set up the backend user, initialize the language object
  * and creating the Export instance
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->setUpBackendUserFromFixture(1);
     \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->initializeLanguageObject();
     $this->export = GeneralUtility::makeInstance(\TYPO3\CMS\Impexp\Export::class);
     $this->export->init(0, 'export');
 }

作者:mrmore    项目:vkmh_typo   
public function setUp()
 {
     parent::setUp();
     $this->mockedViewHelper = $this->getAccessibleMock('GeorgRinger\\News\\ViewHelpers\\SimplePrevNextViewHelper', ['dummy'], [], '', TRUE, TRUE, FALSE);
     $this->news = new News();
     $this->news->setPid(9);
     $this->importDataSet(__DIR__ . '/../Fixtures/tx_news_domain_model_news.xml');
 }

作者:preinbot    项目:moox_new   
public function setUp()
 {
     parent::setUp();
     $this->mockedViewHelper = $this->getAccessibleMock('Tx_MooxNews_ViewHelpers_SimplePrevNextViewHelper', array('dummy'), array(), '', TRUE, TRUE, FALSE);
     $this->news = new \Tx_MooxNews_Domain_Model_News();
     $this->news->setPid(9);
     $this->importDataSet(__DIR__ . '/../Fixtures/tx_mooxnews_domain_model_news.xml');
 }


问题


面经


文章

微信
公众号

扫码关注公众号