split() public static method

public static split ( $wpConfigPath, $commonConfigName = self::COMMON_CONFIG_NAME )
Ejemplo n.º 1
0
 private function createCommonConfig()
 {
     $configPath = WordPressMissingFunctions::getWpConfigPath();
     WpConfigSplitter::split($configPath);
 }
Ejemplo n.º 2
0
/**
 * 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);
 }