HEX
Server: Apache
System: Linux efa57bbe-abb1-400d-2985-3b056fbc2701.secureserver.net 6.1.147-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 24 12:33:32 EDT 2025 x86_64
User: root (0)
PHP: 8.0.30.4
Disabled: NONE
Upload Files
File: //var/www/wp-content/mu-plugins/vendor/wpex/godaddy-launch/phpunit/ResellerTest.php
<?php
/**
 * Test the Reseller environment.
 *
 * @package GoDaddy_Launch
 */

namespace GoDaddy\WordPress\Plugins\Launch\Tests;

/**
 * Tests the Reseller condition for the plugin.
 */
class Reseller_Test extends \WP_UnitTestCase {

	/**
	 * Test that the plugin does not load when is a reseller.
	 */
	public function test_plugin_does_not_load_for_reseller() {
		define( 'configData', json_encode( array( 'GD_RESELLER' => '123' ) ) ); // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase

		$actions_before = count( $GLOBALS['wp_filter']['plugins_loaded']->callbacks ?? array() );

		require_once dirname( dirname( __FILE__ ) ) . '/godaddy-launch.php';

		$actions_after = count( $GLOBALS['wp_filter']['plugins_loaded']->callbacks ?? array() );

		$this->assertEquals( $actions_before, $actions_after, 'Plugin should not register any hooks when reseller condition is met' );
	}

}