本文整理汇总了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');
}
示例2: setUp
protected function setUp()
{
parent::setUp();
$this->importDataSet(__DIR__ . '/../Fixtures/pages.xml');
$this->pageRepo = new PageRepository();
$this->pageRepo->init(false);
}
示例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');
}
示例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) {
}
}
示例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');
}
示例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');
}
示例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');
}
示例8: tearDown
protected function tearDown()
{
$this->assertErrorLogEntries();
unset($this->actionService);
unset($this->recordIds);
parent::tearDown();
}
示例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');
}
示例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);
}
示例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);
}
示例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');
}
示例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');
}
示例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');
}
示例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');
}