/** * @param HttpKernelInterface $kernel * @param Application $app */ public function __construct(HttpKernelInterface $kernel, Application $app) { $this->kernel = $kernel; $this->session = $app->getContainer()->resolve('Symfony\\Component\\HttpFoundation\\Session\\SessionInterface'); $this->forceStart = $app->getConfig()->get('session.force', false); $this->cookies = $app->getConfig()->get('session.cookies', []); }
/** * Enable exception handling in the application being tested. * * By default, uncaught exceptions in the application will simply be thrown * again, meaning you have to call `setExpectedException` or similar if an * exception is expected behaviour. If instead you want the application * error handler to do its job and return a response, call this method. * * @return void */ protected function enableExceptionHandling() { $this->app->getErrorHandler()->setRethrow(false); }
/** * Constructor. * * @param ChannelManager $channelManager * @param Application $application * @param ConfigInterface $config */ public function __construct(ChannelManager $channelManager, Application $application, ConfigInterface $config) { $this->environment = $application->getEnvironment(); $this->channelManager = $channelManager; $this->config = $config; }