public static function uninstall_site() { global $wpdb; $tables = AmberInstall::get_tables(); foreach ($tables as $name => $table) { $wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}{$name}"); } }
function setUp() { AmberInstall::activate_site(); $this->status_stub = $this->getMockBuilder('AmberStatus')->disableOriginalConstructor()->getMock(); $this->checker_stub = $this->getMockBuilder('AmberChecker')->disableOriginalConstructor()->getMock(); $this->fetcher_stub = $this->getMockBuilder('AmberFetcher')->disableOriginalConstructor()->getMock(); $this->fetcher_stub->method('fetch')->willReturn(array('id' => '0a137b375cc3881a70e186ce2172c8d1')); Amber::set_status($this->status_stub); Amber::set_checker($this->checker_stub); Amber::set_fetcher($this->fetcher_stub); parent::setUp(); }