/** * setup the wordpress environment / stack if the context is a wordpress context * * @param Context $context */ public function initializeContext(Context $context) { $factory = new InboxFactory($this->wordpressParams['mail']['directory']); if ($context instanceof WordPressInboxFactoryAwareContext) { $context->setInboxFactory($factory); } if (!$context instanceof WordPressContext) { return; } $this->prepareEnvironment(); $this->overwriteConfig(); $this->flushDatabase(); $this->loadStack(); }