/** * @test * @dataProvider commandIdentifiersAndCompiletimeControllerInfo */ public function isCompileTimeCommandControllerChecksIfTheGivenCommandIdentifierRefersToACompileTimeController($compiletimeCommandControllerIdentifiers, $givenCommandIdentifier, $expectedResult) { $bootstrap = new Bootstrap('Testing'); foreach ($compiletimeCommandControllerIdentifiers as $compiletimeCommandControllerIdentifier) { $bootstrap->registerCompiletimeCommand($compiletimeCommandControllerIdentifier); } $this->assertSame($expectedResult, $bootstrap->isCompiletimeCommand($givenCommandIdentifier)); }
/** * Invokes custom PHP code directly after the package manager has been initialized. * * @param \TYPO3\FLOW3\Core\Bootstrap $bootstrap The current bootstrap * @return void */ public function boot(\TYPO3\FLOW3\Core\Bootstrap $bootstrap) { $bootstrap->registerRequestHandler(new \TYPO3\FLOW3\Cli\SlaveRequestHandler($bootstrap)); $bootstrap->registerRequestHandler(new \TYPO3\FLOW3\Cli\CommandRequestHandler($bootstrap)); $bootstrap->registerRequestHandler(new \TYPO3\FLOW3\Http\RequestHandler($bootstrap)); if ($bootstrap->getContext()->isTesting()) { $bootstrap->getEarlyInstance('TYPO3\\FLOW3\\Core\\ClassLoader')->setConsiderTestsNamespace(TRUE); $bootstrap->registerRequestHandler(new \TYPO3\FLOW3\Tests\FunctionalTestRequestHandler($bootstrap)); } $bootstrap->registerCompiletimeCommand('typo3.flow3:core:*'); $bootstrap->registerCompiletimeCommand('typo3.flow3:cache:flush'); $dispatcher = $bootstrap->getSignalSlotDispatcher(); $dispatcher->connect('TYPO3\\FLOW3\\Mvc\\Dispatcher', 'afterControllerInvocation', 'TYPO3\\FLOW3\\Persistence\\PersistenceManagerInterface', 'persistAll'); $dispatcher->connect('TYPO3\\FLOW3\\Cli\\SlaveRequestHandler', 'dispatchedCommandLineSlaveRequest', 'TYPO3\\FLOW3\\Persistence\\PersistenceManagerInterface', 'persistAll'); $dispatcher->connect('TYPO3\\FLOW3\\Core\\Bootstrap', 'bootstrapShuttingDown', 'TYPO3\\FLOW3\\Configuration\\ConfigurationManager', 'shutdown'); $dispatcher->connect('TYPO3\\FLOW3\\Core\\Bootstrap', 'bootstrapShuttingDown', 'TYPO3\\FLOW3\\Object\\ObjectManagerInterface', 'shutdown'); $dispatcher->connect('TYPO3\\FLOW3\\Core\\Bootstrap', 'bootstrapShuttingDown', 'TYPO3\\FLOW3\\Reflection\\ReflectionService', 'saveToCache'); $dispatcher->connect('TYPO3\\FLOW3\\Command\\CoreCommandController', 'finishedCompilationRun', 'TYPO3\\FLOW3\\Security\\Policy\\PolicyService', 'savePolicyCache'); $dispatcher->connect('TYPO3\\FLOW3\\Security\\Authentication\\AuthenticationProviderManager', 'authenticatedToken', 'TYPO3\\FLOW3\\Session\\SessionInterface', 'renewId'); $dispatcher->connect('TYPO3\\FLOW3\\Security\\Authentication\\AuthenticationProviderManager', 'loggedOut', 'TYPO3\\FLOW3\\Session\\SessionInterface', 'destroy'); $dispatcher->connect('TYPO3\\FLOW3\\Monitor\\FileMonitor', 'filesHaveChanged', 'TYPO3\\FLOW3\\Cache\\CacheManager', 'flushSystemCachesByChangedFiles'); $dispatcher->connect('TYPO3\\FLOW3\\Tests\\FunctionalTestCase', 'functionalTestTearDown', 'TYPO3\\FLOW3\\Mvc\\Routing\\Aspect\\RouterCachingAspect', 'flushCaches'); }