public static function setUpBeforeClass() { parent::setUpBeforeClass(); if (self::$testConfig->testSite->installationType !== 'standard') { throw new \PHPUnit_Framework_SkippedTestSuiteError(); } $testDataPath = __DIR__ . '/../test-data'; self::$pluginInfo = ['zipfile' => realpath($testDataPath . '/hello-dolly.1.6.zip'), 'url-fragment' => 'hello-dolly', 'name' => 'Hello Dolly', 'affected-path' => 'hello-dolly/*']; self::$secondPluginInfo = ['zipfile' => realpath($testDataPath . '/hello-dolly.1.6-2.zip'), 'url-fragment' => 'hello-dolly-2', 'name' => 'Hello Dolly 2', 'affected-path' => 'hello-dolly-2/*']; self::$worker->setPluginInfo(self::$pluginInfo); self::$worker->setSecondPluginInfo(self::$secondPluginInfo); // possibly delete single-file Hello dolly try { self::$wpAutomation->runWpCliCommand('plugin', 'uninstall', ['hello']); } catch (\Exception $e) { } // possibly delete our testing plugins try { self::$wpAutomation->runWpCliCommand('plugin', 'uninstall', ['hello-dolly']); self::$wpAutomation->runWpCliCommand('plugin', 'uninstall', ['hello-dolly-2']); } catch (\Exception $e) { } $process = new Process("git add -A && git commit -m " . ProcessUtils::escapeshellarg("Plugin setup"), self::$testConfig->testSite->path); $process->run(); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); self::clearSidebars(); try { self::$wpAutomation->deleteOption('widget_calendar'); } catch (Exception $e) { // It's ok. This option does not exist in the clear WP. } }
public static function setupBeforeClass() { parent::setUpBeforeClass(); if (self::$testConfig->testSite->installationType !== 'standard') { throw new \PHPUnit_Framework_SkippedTestSuiteError(); } $testDataPath = __DIR__ . '/../test-data'; self::$themeInfo = ['zipfile' => realpath($testDataPath . '/test-theme.zip'), 'stylesheet' => 'test-theme', 'name' => 'Test Theme', 'affected-path' => 'test-theme/*']; self::$secondThemeInfo = ['zipfile' => realpath($testDataPath . '/test-theme-2.zip'), 'stylesheet' => 'test-theme-2', 'name' => 'Test Theme 2', 'affected-path' => 'test-theme-2/*']; self::$worker->setThemeInfo(self::$themeInfo); self::$worker->setSecondThemeInfo(self::$secondThemeInfo); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); self::$worker->setUploadedFilePath(realpath(__DIR__ . '/../test-data/test.png')); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); self::$worker->setTestUser(self::$testUser); }