public function setUp()
 {
     parent::setUp();
     $lock = new Lock('testLock');
     $this->lockFileName = $lock->getLockStrategy()->getLockFileName();
     $lock->release();
 }
 /**
  * set to final because this is an important step which may not be overridden.
  */
 public final function tearDown()
 {
     parent::tearDown();
     if ($this->removeIndexOnTearDown === TRUE) {
         $this->testingIndex->delete();
     }
 }
 /**
  * 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'));
 }
 /**
  * Clean up database after running tests
  */
 public function tearDown()
 {
     parent::tearDown();
     if (isset($this->documentManager)) {
         $this->documentManager->getHttpClient()->request('DELETE', '/' . $this->settings['databaseName']);
     }
 }
 /**
  */
 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');
 }
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     if (!$this->persistenceManager instanceof \TYPO3\Flow\Persistence\Doctrine\PersistenceManager) {
         $this->markTestSkipped('Doctrine persistence is not enabled');
     }
 }
 /**
  * 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');
 }
 /**
  * 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'));
 }
 /**
  * @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');
 }
 /**
  * @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');
 }
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     if (!$this->persistenceManager instanceof PersistenceManager) {
         $this->markTestSkipped('Doctrine persistence is not enabled');
     }
     $this->entityRepository = new TimestampableRepository();
 }
 /**
  * @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);
 }
 /**
  * @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();
 }
 /**
  * Every testcase should run *twice*. First, it is run in *uncached* way, second,
  * it is run *cached*. To make sure that the first run is always uncached, the
  * $standaloneViewNonce is initialized to some random value which is used inside
  * an overridden version of StandaloneView::createIdentifierForFile.
  */
 public function runBare()
 {
     $this->standaloneViewNonce = uniqid();
     parent::runBare();
     $numberOfAssertions = $this->getNumAssertions();
     parent::runBare();
     $this->addToAssertionCount($numberOfAssertions);
 }
 /**
  * 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'));
     $route = $this->registerRoute('testc', 'test/mvc/actioncontrollertestc/{entity}(/{@action})', array('@package' => 'TYPO3.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\Fixtures', '@controller' => 'Entity', '@action' => 'show', '@format' => 'html'));
     $route->setRoutePartsConfiguration(array('entity' => array('objectType' => TestEntity::class)));
 }
 /**
  * Initializer
  */
 public function setUp()
 {
     parent::setUp();
     $route = new \TYPO3\Flow\Mvc\Routing\Route();
     $route->setUriPattern('test/fluid/formobjects(/{@action})');
     $route->setDefaults(array('@package' => 'TYPO3.Fluid', '@subpackage' => 'Tests\\Functional\\Form\\Fixtures', '@controller' => 'Form', '@action' => 'index', '@format' => 'html'));
     $route->setAppendExceedingArguments(true);
     $this->router->addRoute($route);
 }
 /**
  * Persist all and destroy the persistence session for the next test
  *
  * @return void
  * @author Christopher Hlubek <*****@*****.**>
  */
 public function tearDown()
 {
     try {
         parent::tearDown();
     } catch (\Exception $e) {
         \TYPO3\Flow\var_dump($e, 'Exception during tearDown');
     }
     $this->tearDownPersistence();
 }
 /**
  * @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 = new TestEntityRepository();
     $this->extendedTypesEntityRepository = new ExtendedTypesEntityRepository();
 }
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $route = new Route();
     $route->setName('Functional Test - Session::SessionTest');
     $route->setUriPattern('test/session(/{@action})');
     $route->setDefaults(array('@package' => 'TYPO3.Flow', '@subpackage' => 'Tests\\Functional\\Session\\Fixtures', '@controller' => 'SessionTest', '@action' => 'sessionStart', '@format' => 'html'));
     $this->router->addRoute($route);
 }
 /**
  * @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::class);
     $this->registerRoute('post', 'test/validation/entity/{@action}', array('@package' => 'TYPO3.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\Fixtures', '@controller' => 'Entity', '@format' => 'html'));
 }
 /**
  * Initializer
  */
 public function setUp()
 {
     parent::setUp();
     $route = new \TYPO3\Flow\Mvc\Routing\Route();
     $route->setUriPattern('test/form/simpleform/{formFactoryClassName}');
     $route->setDefaults(array('@package' => 'TYPO3.Form', '@subpackage' => 'Tests\\Functional\\Fixtures', '@controller' => 'Form', '@action' => 'index', '@format' => 'html'));
     $route->setAppendExceedingArguments(TRUE);
     $this->router->addRoute($route);
 }
 public function setUp()
 {
     parent::setUp();
     $accountRepository = $this->objectManager->get('\\TYPO3\\Flow\\Security\\AccountRepository');
     $accountFactory = $this->objectManager->get('\\TYPO3\\Flow\\Security\\AccountFactory');
     $registrant = $accountFactory->createAccountWithPassword('functional_test_account', 'a_very_secure_long_password', array('T3DD.Backend:Authenticated'), 'HttpBasic');
     $accountRepository->add($registrant);
     $this->persistenceManager->persistAll();
 }
 /**
  *  Initialize recaptcha
  *
  *  @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->recaptcha = new \TYPO3\Recaptcha\Domain\Model\Recaptcha();
     $this->session = $this->objectManager->get('TYPO3\\Flow\\Session\\SessionInterface');
     if (!$this->session->isStarted()) {
         $this->session->start();
     }
 }
 public function tearDown()
 {
     $persistenceManager = self::$bootstrap->getObjectManager()->get('TYPO3\\Flow\\Persistence\\PersistenceManagerInterface');
     if (is_callable(array($persistenceManager, 'tearDown'))) {
         $persistenceManager->tearDown();
     }
     self::$bootstrap->getObjectManager()->forgetInstance('TYPO3\\Flow\\Persistence\\PersistenceManagerInterface');
     parent::tearDown();
 }
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $route = new Route();
     $route->setName('Functional Test - Http::Client::InternalRequestEngine');
     $route->setUriPattern('test/security/restricted');
     $route->setDefaults(array('@package' => 'TYPO3.Flow', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'Restricted', '@action' => 'admin', '@format' => 'html'));
     $this->router->addRoute($route);
 }
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     if (!extension_loaded('curl')) {
         $this->markTestSkipped('Curl extension was not available.');
     }
     $curlEngine = $this->objectManager->get('TYPO3\\Flow\\Http\\Client\\CurlEngine');
     $this->browser->setRequestEngine($curlEngine);
 }
 /**
  * Additional setup: Routes
  */
 public function setUp()
 {
     parent::setUp();
     $route = new Route();
     $route->setName('WidgetTest');
     $route->setUriPattern('test/widget/{@controller}(/{@action})');
     $route->setDefaults(array('@package' => 'TYPO3.Fluid', '@subpackage' => 'Tests\\Functional\\Core\\Fixtures', '@action' => 'index', '@format' => 'html'));
     $route->setAppendExceedingArguments(TRUE);
     $this->router->addRoute($route);
 }
 /**
  * Additional setup: Routes
  */
 public function setUp()
 {
     parent::setUp();
     $route = new Route();
     $route->setName('AbstractControllerTest Route 1');
     $route->setUriPattern('test/mvc/abstractcontrollertesta/{@action}');
     $route->setDefaults(array('@package' => 'TYPO3.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\Fixtures', '@controller' => 'AbstractControllerTestA', '@format' => 'html'));
     $route->setAppendExceedingArguments(true);
     $this->router->addRoute($route);
 }
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $accountRepository = $this->objectManager->get(\TYPO3\Flow\Security\AccountRepository::class);
     $accountFactory = $this->objectManager->get(\TYPO3\Flow\Security\AccountFactory::class);
     $account = $accountFactory->createAccountWithPassword('admin', 'password', array('TYPO3.Flow:Administrator'), 'UsernamePasswordTestingProvider');
     $accountRepository->add($account);
     $this->persistenceManager->persistAll();
     $this->registerRoute('authentication', 'test/security/authentication/usernamepassword(/{@action})', array('@package' => 'TYPO3.Flow', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'UsernamePasswordTest', '@action' => 'authenticate', '@format' => 'html'));
     $this->registerRoute('controller', 'test/security/restricted(/{@action})', array('@package' => 'TYPO3.Flow', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'Restricted', '@action' => 'public', '@format' => 'html'), TRUE);
 }
 /**
  * @return void
  * @author Christopher Hlubek <*****@*****.**>
  */
 public function setUp()
 {
     parent::setUp();
     $this->client = new \TYPO3\CouchDB\Client($this->dataSourceName);
     $this->client->setDatabaseName($this->databaseName);
     if ($this->client->databaseExists($this->databaseName)) {
         $this->client->deleteDatabase($this->databaseName);
     }
     $this->backend = new \TYPO3\CouchDB\Log\Backend\CouchDbBackend(array('databaseName' => $this->databaseName, 'dataSourceName' => $this->dataSourceName));
     $this->backend->open();
 }