Exemplo n.º 1
0
 /**
  * Install AxisComposer after the test environment and AC have been loaded
  *
  * @since 1.0.0
  */
 public function install_ac()
 {
     // Clean existing install first
     define('WP_UNINSTALL_PLUGIN', true);
     define('AC_REMOVE_ALL_DATA', true);
     include $this->plugin_dir . '/uninstall.php';
     AC_Install::install();
     // Reload capabilities after install, see https://core.trac.wordpress.org/ticket/28374
     $GLOBALS['wp_roles']->reinit();
     echo "Installing AxisComposer..." . PHP_EOL;
 }
Exemplo n.º 2
0
 /**
  * Test - install
  */
 public function test_install()
 {
     // Clean existing install first
     if (!defined('WP_UNINSTALL_PLUGIN')) {
         define('WP_UNINSTALL_PLUGIN', true);
         define('AC_REMOVE_ALL_DATA', true);
     }
     include dirname(dirname(dirname(dirname(__FILE__)))) . '/uninstall.php';
     AC_Install::install();
     $this->assertTrue(get_option('axiscomposer_version') === AC()->version);
 }