- Add HVAC_Test_User_Factory class with: * User creation with specific roles * Multiple role support * Persona management system * Account cleanup integration - Create comprehensive test suite in HVAC_Test_User_Factory_Test.php - Update testing improvement plan documentation - Add implementation decisions to project memory bank - Restructure .gitignore with: * Whitelist approach for better file management * Explicit backup exclusions * Specific bin directory inclusions Part of the Account Management component from the testing framework improvement plan.
67 lines
No EOL
1.9 KiB
PHP
67 lines
No EOL
1.9 KiB
PHP
<?php
|
|
/**
|
|
* Enhanced smoke test for HVAC Community Events plugin
|
|
*/
|
|
|
|
// Enable error reporting
|
|
error_reporting(E_ALL);
|
|
ini_set('display_errors', 1);
|
|
|
|
// Load test environment
|
|
require_once dirname(__DIR__) . '/bootstrap-staging.php';
|
|
|
|
function log_test_step($step, $message) {
|
|
error_log("[HVAC SMOKE TEST] Step $step: $message");
|
|
echo "[HVAC SMOKE TEST] Step $step: $message\n";
|
|
}
|
|
|
|
// Step 1: Verify WordPress loaded
|
|
log_test_step(1, "Verifying WordPress environment...");
|
|
if (!defined('ABSPATH')) {
|
|
log_test_step(1, "FAIL: WordPress environment not loaded");
|
|
exit(1);
|
|
}
|
|
log_test_step(1, "PASS: WordPress environment verified");
|
|
|
|
// Step 2: Verify test doubles loaded
|
|
log_test_step(2, "Checking test doubles...");
|
|
if (!class_exists('Tribe__Events__Main')) {
|
|
log_test_step(2, "FAIL: TEC test doubles not loaded");
|
|
exit(1);
|
|
}
|
|
log_test_step(2, "PASS: Test doubles verified");
|
|
|
|
// Step 3: Verify plugin loaded
|
|
log_test_step(3, "Checking plugin class...");
|
|
if (!class_exists('HVAC_Community_Events')) {
|
|
log_test_step(3, "FAIL: Plugin class not loaded");
|
|
exit(1);
|
|
}
|
|
log_test_step(3, "PASS: Plugin class verified");
|
|
|
|
// Step 4: Verify version constant
|
|
log_test_step(4, "Checking version constant...");
|
|
if (!defined('HVAC_CE_VERSION')) {
|
|
log_test_step(4, "FAIL: Version constant not defined");
|
|
exit(1);
|
|
}
|
|
log_test_step(4, "PASS: Version constant verified");
|
|
|
|
// Step 5: Verify TEC functions
|
|
log_test_step(5, "Checking TEC functions...");
|
|
$required_functions = [
|
|
'tribe_get_events',
|
|
'tribe_get_start_date',
|
|
'tribe_get_end_date'
|
|
];
|
|
|
|
foreach ($required_functions as $function) {
|
|
if (!function_exists($function)) {
|
|
log_test_step(5, "FAIL: Required TEC function '$function' not available");
|
|
exit(1);
|
|
}
|
|
}
|
|
log_test_step(5, "PASS: All required TEC functions verified");
|
|
|
|
log_test_step('FINAL', "All smoke test checks completed successfully");
|
|
exit(0); |