/** * Additional setup: Routes */ public function setUp() { parent::setUp(); $this->registerRoute('viewsconfigurationa', 'test/mvc/viewsconfigurationa(/{@action})', ['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\ViewsConfiguration\\Fixtures', '@controller' => 'ViewsConfigurationTestA', '@action' => 'first', '@format' => 'html']); $this->registerRoute('viewsconfigurationb', 'test/mvc/viewsconfigurationb(/{@action})', ['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\ViewsConfiguration\\Fixtures', '@controller' => 'ViewsConfigurationTestB', '@action' => 'first', '@format' => 'html']); $this->registerRoute('viewsconfigurationc', 'test/mvc/viewsconfigurationc(/{@action})', ['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\ViewsConfiguration\\Fixtures', '@controller' => 'ViewsConfigurationTestC', '@action' => 'index', '@format' => 'html']); }
/** * @return void */ public function setUp() { parent::setUp(); if (!$this->persistenceManager instanceof PersistenceManager) { $this->markTestSkipped('Doctrine persistence is not enabled'); } }
/** */ public function setUp() { parent::setUp(); $this->partyRepository = $this->objectManager->get(PartyRepository::class); $this->accountRepository = $this->objectManager->get(AccountRepository::class); $this->accountFactory = $this->objectManager->get(AccountFactory::class); }
/** * @return void */ public function setUp() { parent::setUp(); if (!$this->persistenceManager instanceof \Neos\Flow\Persistence\Doctrine\PersistenceManager) { $this->markTestSkipped('Doctrine persistence is not enabled'); } $this->postRepository = $this->objectManager->get(\Neos\Flow\Tests\Functional\Persistence\Fixtures\PostRepository::class); }
/** * Additional setup: Routes */ public function setUp() { parent::setUp(); $this->registerRoute('testa', 'test/mvc/actioncontrollertesta(/{@action})', ['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\Fixtures', '@controller' => 'ActionControllerTestA', '@action' => 'first', '@format' => 'html']); $this->registerRoute('testb', 'test/mvc/actioncontrollertestb(/{@action})', ['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\Fixtures', '@controller' => 'ActionControllerTestB', '@action' => 'first', '@format' => 'html']); $route = $this->registerRoute('testc', 'test/mvc/actioncontrollertestc/{entity}(/{@action})', ['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\Fixtures', '@controller' => 'Entity', '@action' => 'show', '@format' => 'html']); $route->setRoutePartsConfiguration(['entity' => ['objectType' => \Neos\Flow\Tests\Functional\Persistence\Fixtures\TestEntity::class]]); }
/** * 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); }
/** * @return void */ public function setUp() { parent::setUp(); if (!$this->persistenceManager instanceof PersistenceManager) { $this->markTestSkipped('Doctrine persistence is not enabled'); } $this->resourceManager = $this->objectManager->get(ResourceManager::class); }
/** * @return void */ public function setUp() { parent::setUp(); if (!$this->persistenceManager instanceof PersistenceManager) { $this->markTestSkipped('Doctrine persistence is not enabled'); } $this->testEntityRepository = $this->objectManager->get(Fixtures\TestEntityRepository::class); }
/** * Initializer */ public function setUp() { parent::setUp(); $route = new \Neos\Flow\Mvc\Routing\Route(); $route->setUriPattern('test/fluid/formobjects(/{@action})'); $route->setDefaults(array('@package' => 'Neos.FluidAdaptor', '@subpackage' => 'Tests\\Functional\\Form\\Fixtures', '@controller' => 'Form', '@action' => 'index', '@format' => 'html')); $route->setAppendExceedingArguments(true); $this->router->addRoute($route); }
/** * Initializer */ public function setUp() { parent::setUp(); $route = new \Neos\Flow\Mvc\Routing\Route(); $route->setUriPattern('test/form/simpleform/{formFactoryClassName}'); $route->setDefaults(array('@package' => 'Neos.Form', '@subpackage' => 'Tests\\Functional\\Fixtures', '@controller' => 'Form', '@action' => 'index', '@format' => 'html')); $route->setAppendExceedingArguments(true); $this->router->addRoute($route); }
/** * @return void */ public function setUp() { parent::setUp(); if (!$this->persistenceManager instanceof PersistenceManager) { $this->markTestSkipped('Doctrine persistence is not enabled'); } $this->testEntityRepository = new Fixtures\TestEntityRepository(); $this->extendedTypesEntityRepository = new Fixtures\ExtendedTypesEntityRepository(); }
/** * @return void */ public function setUp() { parent::setUp(); if (!$this->persistenceManager instanceof PersistenceManager) { $this->markTestSkipped('Doctrine persistence is not enabled'); } $this->testEntityRepository = $this->objectManager->get(Fixtures\TestEntityRepository::class); $this->registerRoute('post', 'test/validation/entity/{@action}', ['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\Fixtures', '@controller' => 'Entity', '@format' => 'html']); }
public function tearDown() { $persistenceManager = self::$bootstrap->getObjectManager()->get(PersistenceManagerInterface::class); if (is_callable(array($persistenceManager, 'tearDown'))) { $persistenceManager->tearDown(); } self::$bootstrap->getObjectManager()->forgetInstance(PersistenceManagerInterface::class); parent::tearDown(); }
/** * @return void */ public function setUp() { parent::setUp(); $route = new Route(); $route->setName('Functional Test - Session::SessionTest'); $route->setUriPattern('test/session(/{@action})'); $route->setDefaults(['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Session\\Fixtures', '@controller' => 'SessionTest', '@action' => 'sessionStart', '@format' => 'html']); $this->router->addRoute($route); }
/** * @return void */ public function setUp() { parent::setUp(); $route = new Route(); $route->setName('Functional Test - Http::Client::InternalRequestEngine'); $route->setUriPattern('test/security/restricted'); $route->setDefaults(['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'Restricted', '@action' => 'admin', '@format' => 'html']); $this->router->addRoute($route); }
/** * Additional setup: Routes */ public function setUp() { parent::setUp(); $route = new Route(); $route->setName('WidgetTest'); $route->setUriPattern('test/widget/{@controller}(/{@action})'); $route->setDefaults(array('@package' => 'Neos.FluidAdaptor', '@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(['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Mvc\\Fixtures', '@controller' => 'AbstractControllerTestA', '@format' => 'html']); $route->setAppendExceedingArguments(true); $this->router->addRoute($route); }
public function setUp() { parent::setUp(); $this->persistedUsernamePasswordProvider = new PersistedUsernamePasswordProvider('myTestProvider'); $this->accountFactory = new Security\AccountFactory(); $this->accountRepository = new Security\AccountRepository(); $this->authenticationToken = $this->getAccessibleMock(Security\Authentication\Token\UsernamePassword::class, array('dummy')); $account = $this->accountFactory->createAccountWithPassword('username', 'password', array(), 'myTestProvider'); $this->accountRepository->add($account); $this->persistenceManager->persistAll(); }
/** * @return void */ public function setUp() { parent::setUp(); $accountRepository = $this->objectManager->get(AccountRepository::class); $accountFactory = $this->objectManager->get(AccountFactory::class); $account = $accountFactory->createAccountWithPassword('admin', 'password', ['Neos.Flow:Administrator'], 'UsernamePasswordTestingProvider'); $accountRepository->add($account); $this->persistenceManager->persistAll(); $this->registerRoute('authentication', 'test/security/authentication/usernamepassword(/{@action})', ['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'UsernamePasswordTest', '@action' => 'authenticate', '@format' => 'html']); $this->registerRoute('controller', 'test/security/restricted(/{@action})', ['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'Restricted', '@action' => 'public', '@format' => 'html'], true); }
/** * @return void */ public function setUp() { parent::setUp(); if (!$this->persistenceManager instanceof PersistenceManager) { $this->markTestSkipped('Doctrine persistence is not enabled'); } $this->restrictableEntityDoctrineRepository = new Fixtures\RestrictableEntityDoctrineRepository(); $this->testEntityADoctrineRepository = new Fixtures\TestEntityADoctrineRepository(); $this->testEntityCDoctrineRepository = new Fixtures\TestEntityCDoctrineRepository(); $this->testEntityDDoctrineRepository = new Fixtures\TestEntityDDoctrineRepository(); $this->globalObjectTestContext = $this->objectManager->get(Aop\Fixtures\TestContext::class); }
/** * Validate that test routes are loaded */ public function setUp() { parent::setUp(); $foundRoute = false; /** @var $route Route */ foreach ($this->router->getRoutes() as $route) { if ($route->getName() === 'Flow :: Functional Test: HTTP - FooController') { $foundRoute = true; break; } } if (!$foundRoute) { $this->markTestSkipped('In this distribution the Flow routes are not included into the global configuration.'); return; } }
/** * @return void */ public function setUp() { parent::setUp(); $accountRepository = $this->objectManager->get(AccountRepository::class); $accountFactory = $this->objectManager->get(AccountFactory::class); $account = $accountFactory->createAccountWithPassword('functional_test_account', 'a_very_secure_long_password', ['Neos.Flow:Administrator'], 'TestingProvider'); $accountRepository->add($account); $account2 = $accountFactory->createAccountWithPassword('functional_test_account', 'a_very_secure_long_password', ['Neos.Flow:Administrator'], 'HttpBasicTestingProvider'); $accountRepository->add($account2); $account3 = $accountFactory->createAccountWithPassword('functional_test_account', 'a_very_secure_long_password', ['Neos.Flow:Administrator'], 'UsernamePasswordTestingProvider'); $accountRepository->add($account3); $this->persistenceManager->persistAll(); $route = new Route(); $route->setName('Functional Test - Security::Restricted'); $route->setUriPattern('test/security/restricted(/{@action})'); $route->setDefaults(['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'Restricted', '@action' => 'public', '@format' => 'html']); $route->setAppendExceedingArguments(true); $this->router->addRoute($route); $route2 = new Route(); $route2->setName('Functional Test - Security::Authentication'); $route2->setUriPattern('test/security/authentication(/{@action})'); $route2->setDefaults(['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'Authentication', '@action' => 'authenticate', '@format' => 'html']); $route2->setAppendExceedingArguments(true); $this->router->addRoute($route2); $route3 = new Route(); $route3->setName('Functional Test - Security::HttpBasicAuthentication'); $route3->setUriPattern('test/security/authentication/httpbasic(/{@action})'); $route3->setDefaults(['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'HttpBasicTest', '@action' => 'authenticate', '@format' => 'html']); $route3->setAppendExceedingArguments(true); $this->router->addRoute($route3); $route4 = new Route(); $route4->setName('Functional Test - Security::UsernamePasswordAuthentication'); $route4->setUriPattern('test/security/authentication/usernamepassword(/{@action})'); $route4->setDefaults(['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'UsernamePasswordTest', '@action' => 'authenticate', '@format' => 'html']); $route4->setAppendExceedingArguments(true); $this->router->addRoute($route4); }
/** * Initialize dependencies */ public function setUp() { parent::setUp(); $this->formatResolver = $this->objectManager->get(FormatResolver::class); }
public function setUp() { parent::setUp(); $this->configurationManager = $this->objectManager->get(ConfigurationManager::class); Debugger::clearState(); }
/** * @return void */ public function setUp() { parent::setUp(); $this->repository = $this->objectManager->get(MigrationStatusRepository::class); }
public function setUp() { parent::setUp(); $this->nodeTypeSchemaBuilder = $this->objectManager->get(NodeTypeSchemaBuilder::class); $this->schema = $this->nodeTypeSchemaBuilder->generateNodeTypeSchema(); }
/** * @return void */ public function tearDown() { $this->saveNodesAndTearDownRootNodeAndRepository(); parent::tearDown(); }
public function tearDown() { parent::tearDown(); $this->inject($this->contextFactory, 'contextInstances', array()); }
public function tearDown() { parent::tearDown(); $this->emittedSignals = []; }
public function tearDown() { parent::tearDown(); $this->inject($this->contextFactory, 'contextInstances', array()); $this->inject($this->objectManager->get(AssetInterfaceConverter::class), 'resourcesAlreadyConvertedToAssets', array()); }