setUpSite() 공개 메소드

Database as specified in the config file must exist and be accessible. It takes optional parameter entityCounts, that is an array containing an amount of generated entities - {@see \populateSite}.
public setUpSite ( array $entityCounts = [] )
$entityCounts array
예제 #1
0
 /**
  * Check if site is set up and VersionPress fully activated, and if not, do so. The $force
  * parametr may force this.
  *
  * @param bool $force Force all the automation actions to be taken regardless of the site state
  */
 private static function setUpSite($force)
 {
     if ($force || !self::$wpAutomation->isSiteSetUp()) {
         self::$wpAutomation->setUpSite();
     }
     if ($force || !self::$wpAutomation->isVersionPressInitialized()) {
         self::$wpAutomation->copyVersionPressFiles();
         self::$wpAutomation->initializeVersionPress();
     }
 }
 /**
  * @test
  */
 public function runAutomation()
 {
     $testConfig = TestConfig::createDefaultConfig();
     $wpAutomation = new WpAutomation($testConfig->testSite, $testConfig->wpCliVersion);
     $wpAutomation->setUpSite();
     $wpAutomation->copyVersionPressFiles();
     $wpAutomation->activateVersionPress();
     $wpAutomation->runWpCliCommand('vp', 'config', ['VP_PROJECT_ROOT', '.']);
 }
예제 #3
0
 /**
  * @param WpAutomation $wpAutomation
  */
 private function prepareSite($wpAutomation)
 {
     $wpAutomation->setUpSite();
     $wpAutomation->copyVersionPressFiles();
     $wpAutomation->disableDebugger();
     $wpAutomation->activateVersionPress();
     $wpAutomation->initializeVersionPress();
 }