private function createCommonConfig() { $configPath = WordPressMissingFunctions::getWpConfigPath(); WpConfigSplitter::split($configPath); }
/** * Activates the plugin from a WordPress point of view. Note that for VersionPress * to become fully active, the Initializer needs to be run. * * @see Initializer */ function vp_activate() { WpConfigSplitter::split(WordPressMissingFunctions::getWpConfigPath()); set_transient('vp_just_activated', '1', 10); }
/** * @test */ public function runningSplitterMultipleTimesDoesntChangeTheOutput() { WpConfigSplitter::split($this->wpConfigPath, $this->commonConfigName); WpConfigSplitter::split($this->wpConfigPath, $this->commonConfigName); WpConfigSplitter::split($this->wpConfigPath, $this->commonConfigName); $filteredConfig = file_get_contents($this->wpConfigPath); $commonConfig = file_get_contents($this->commonConfigPath); $this->assertEquals($this->filteredConfig, $filteredConfig); $this->assertEquals($this->commonConfig, $commonConfig); }