本文整理汇总了PHP中TYPO3\Flow\Tests\FunctionalTestCase::setUp方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionalTestCase::setUp方法的具体用法?PHP FunctionalTestCase::setUp怎么用?PHP FunctionalTestCase::setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\Flow\Tests\FunctionalTestCase
的用法示例。
在下文中一共展示了FunctionalTestCase::setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
$this->currentUserWorkspace = uniqid('user-', true);
$this->currentGroupWorkspace = uniqid('group-', true);
$this->setUpRootNodeAndRepository();
}
示例2: setUp
/**
* Additional setup: Routes
*/
public function setUp()
{
parent::setUp();
$this->registerRoute('testa', 'test/mvc/actioncontrollertesta(/{@action})', array('@package' => 'TYPO3.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\Fixtures', '@controller' => 'ActionControllerTestA', '@action' => 'first', '@format' => 'html'));
$this->registerRoute('testb', 'test/mvc/actioncontrollertestb(/{@action})', array('@package' => 'TYPO3.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\Fixtures', '@controller' => 'ActionControllerTestB', '@format' => 'html'));
$this->registerRoute('testc', 'test/mvc/actioncontrollertestc/{entity}', array('@package' => 'TYPO3.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\Fixtures', '@controller' => 'Entity', '@action' => 'show', '@format' => 'html'));
}
示例3: setUp
/**
* Additional setup: Routes
*/
public function setUp()
{
parent::setUp();
$this->registerRoute('viewsconfigurationa', 'test/mvc/viewsconfigurationa(/{@action})', array('@package' => 'TYPO3.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\ViewsConfiguration\\Fixtures', '@controller' => 'ViewsConfigurationTestA', '@format' => 'html'));
$this->registerRoute('viewsconfigurationb', 'test/mvc/viewsconfigurationb(/{@action})', array('@package' => 'TYPO3.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\ViewsConfiguration\\Fixtures', '@controller' => 'ViewsConfigurationTestB', '@action' => 'first', '@format' => 'html'));
$this->registerRoute('viewsconfigurationc', 'test/mvc/viewsconfigurationc(/{@action})', array('@package' => 'TYPO3.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\ViewsConfiguration\\Fixtures', '@controller' => 'ViewsConfigurationTestC', '@action' => 'index', '@format' => 'html'));
}
示例4: setUp
/**
* Additional setup: Repositories, security
*/
public function setUp()
{
parent::setUp();
$this->userRepository = $this->objectManager->get('_OurBrand_\\Quiz\\Domain\\Repository\\UserRepository');
$this->quizRepository = $this->objectManager->get('_OurBrand_\\Quiz\\Domain\\Repository\\QuizRepository');
// $this->quizController = $this->objectManager->get('_OurBrand_\Quiz\Controller\QuizController');
}
示例5: setUp
public function setUp()
{
parent::setUp();
$lock = new Lock('testLock');
$this->lockFileName = $lock->getLockStrategy()->getLockFileName();
$lock->release();
}
示例6: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
$this->nodeDataRepository = new \TYPO3\TYPO3CR\Domain\Repository\NodeDataRepository();
$this->contextFactory = $this->objectManager->get('TYPO3\\TYPO3CR\\Domain\\Service\\ContextFactoryInterface');
$this->context = $this->contextFactory->create(array('workspaceName' => 'live'));
}
示例7: setUp
/**
*/
public function setUp()
{
parent::setUp();
$this->partyRepository = $this->objectManager->get('TYPO3\\Party\\Domain\\Repository\\PartyRepository');
$this->accountRepository = $this->objectManager->get('TYPO3\\Flow\\Security\\AccountRepository');
$this->accountFactory = $this->objectManager->get('TYPO3\\Flow\\Security\\AccountFactory');
}
示例8: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
if (!$this->persistenceManager instanceof \TYPO3\Flow\Persistence\Doctrine\PersistenceManager) {
$this->markTestSkipped('Doctrine persistence is not enabled');
}
}
示例9: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
$this->nodeDataRepository = $this->objectManager->get(NodeDataRepository::class);
$domainRepository = $this->objectManager->get(DomainRepository::class);
$siteRepository = $this->objectManager->get(SiteRepository::class);
$this->contextFactory = $this->objectManager->get(ContextFactoryInterface::class);
$contextProperties = array('workspaceName' => 'live');
$contentContext = $this->contextFactory->create($contextProperties);
$siteImportService = $this->objectManager->get(SiteImportService::class);
$siteImportService->importFromFile(__DIR__ . '/../Fixtures/NodeStructure.xml', $contentContext);
$this->persistenceManager->persistAll();
$currentDomain = $domainRepository->findOneByActiveRequest();
if ($currentDomain !== null) {
$contextProperties['currentSite'] = $currentDomain->getSite();
$contextProperties['currentDomain'] = $currentDomain;
} else {
$contextProperties['currentSite'] = $siteRepository->findFirst();
}
$contentContext = $this->contextFactory->create($contextProperties);
$this->contentContext = $contentContext;
$this->propertyMapper = $this->objectManager->get(PropertyMapper::class);
$this->baseNode = $this->contentContext->getCurrentSiteNode()->getNode('home');
$this->linkingService = $this->objectManager->get(LinkingService::class);
/** @var $requestHandler FunctionalTestRequestHandler */
$requestHandler = self::$bootstrap->getActiveRequestHandler();
$this->controllerContext = new ControllerContext(new ActionRequest($requestHandler->getHttpRequest()), $requestHandler->getHttpResponse(), new Arguments(array()), new UriBuilder());
}
示例10: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
if (!$this->persistenceManager instanceof \TYPO3\Flow\Persistence\Doctrine\PersistenceManager) {
$this->markTestSkipped('Doctrine persistence is not enabled');
}
$this->restrictableEntityRepository = new Fixtures\RestrictableEntityRepository();
}
示例11: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
if (!$this->persistenceManager instanceof \TYPO3\Flow\Persistence\Doctrine\PersistenceManager) {
$this->markTestSkipped('Doctrine persistence is not enabled');
}
$this->testEntityRepository = $this->objectManager->get('TYPO3\\Flow\\Tests\\Functional\\Persistence\\Fixtures\\TestEntityRepository');
}
示例12: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
$this->currentTestWorkspaceName = uniqid('user-', TRUE);
$this->setUpRootNodeAndRepository();
$this->workspaceRepository = $this->objectManager->get('TYPO3\\TYPO3CR\\Domain\\Repository\\WorkspaceRepository');
$this->liveWorkspace = $this->workspaceRepository->findOneByName('live');
}
示例13: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
if (!$this->persistenceManager instanceof PersistenceManager) {
$this->markTestSkipped('Doctrine persistence is not enabled');
}
$this->resourceManager = $this->objectManager->get('TYPO3\\Flow\\Resource\\ResourceManager');
}
示例14: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
if (!$this->persistenceManager instanceof PersistenceManager) {
$this->markTestSkipped('Doctrine persistence is not enabled');
}
$this->entityRepository = new TimestampableRepository();
}
示例15: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
if (!$this->persistenceManager instanceof \TYPO3\Flow\Persistence\Doctrine\PersistenceManager) {
$this->markTestSkipped('Doctrine persistence is not enabled');
}
$this->postRepository = $this->objectManager->get(\TYPO3\Flow\Tests\Functional\Persistence\Fixtures\PostRepository::class);
}