<?php
/**
 * Modified test bootstrap file for HVAC Community Events plugin
 */

// Define test environment
define('HVAC_TEST_DIR', __DIR__);
define('HVAC_PLUGIN_DIR', dirname(__DIR__));
define('HVAC_DEBUG', true);

// First, load Composer's autoloader
require_once dirname(__DIR__) . '/vendor/autoload.php';

// Load WP PHPUnit's bootstrap file
require_once dirname(__DIR__) . '/vendor/wp-phpunit/wp-phpunit/includes/bootstrap.php';

/**
 * Load the plugin being tested
 */
function _manually_load_plugin() {
    require dirname(__DIR__) . '/wordpress/wp-content/plugins/hvac-community-events/hvac-community-events.php';
}

// Load our plugin
tests_add_filter('muplugins_loaded', '_manually_load_plugin');

// Load test doubles
require_once __DIR__ . '/test-doubles.php';

// Debug output
if (defined('HVAC_DEBUG') && HVAC_DEBUG) {
    error_log('[HVAC TEST] Modified bootstrap complete');
}