HEX
Server: Apache
System: Linux websend04.greenconsulting.it 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User: web20 (5023)
PHP: 7.2.34-38+ubuntu18.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/clients/client0/web20/web/wp-content/plugins/wpmudev-updates/tests/phpunit/util.php
<?php

class WPMUDEV_Dashboard_Test_Util {

	const WPMUDEV_API_KEY = '703cd83f1f7f929ebe5994207847e907ca1b3faa';

	public static $is_logged_in = false;

	public static function login() {
		WPMUDEV_Dashboard::$api->set_key( self::WPMUDEV_API_KEY );
		WPMUDEV_Dashboard::$api->hub_sync( false, true );
		self::$is_logged_in = true;
	}

	public static function logout() {
		if ( ! self::$is_logged_in ) {
			return;
		}
		WPMUDEV_Dashboard::$api->revoke_remote_access();
		WPMUDEV_Dashboard::$api->analytics_disable();
		WPMUDEV_Dashboard::$settings->reset();
		WPMUDEV_Dashboard::$api->set_key( '' );
		WPMUDEV_Dashboard::$api->hub_sync( false, true ); // force a sync so that site is removed from user's hub.
		self::$is_logged_in = false;
	}

	public static function open_json_data( $file_name ) {
		return file_get_contents( dirname( __FILE__ ) . '/data/' . $file_name );// phpcs:ignore WordPress.WP.AlternativeFunctions -- Internal usage for test purpose only
	}
}