<?php
/**
 * WordPress tests configuration file
 */

// Test environment settings
$is_staging = getenv('HVAC_ENV') === 'staging';

// Database settings
if ($is_staging) {
    define('DB_NAME', 'uberrxmprk');
    define('DB_USER', 'uberrxmprk');
    define('DB_PASSWORD', 'vRVr7GJCAZ');
    define('DB_HOST', 'localhost');
} else {
    define('DB_NAME', 'wordpress_test');
    define('DB_USER', 'uberrxmprk');
    define('DB_PASSWORD', '');
    define('DB_HOST', 'localhost');
}

define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');

// Test suite configuration
define('ABSPATH', dirname(dirname(__DIR__)) . '/wordpress-dev/wordpress/');
define('WP_TESTS_DOMAIN', $is_staging ? 'wordpress-974670-5399585.cloudwaysapps.com' : 'localhost');
define('WP_TESTS_EMAIL', 'admin@example.com');
define('WP_TESTS_TITLE', 'Test Blog');
define('WP_PHP_BINARY', 'php');

// Test environment
define('WP_TESTS_FORCE_KNOWN_BUGS', false);
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', true);

// Prevent filesystem modifications
define('WP_TESTS_FILESYSTEM_SAFE', true);

// Load custom test configuration if it exists
if (file_exists(dirname(__FILE__) . '/wp-tests-config-local.php')) {
    require dirname(__FILE__) . '/wp-tests-config-local.php';
}