upskill-event-manager/wordpress-dev/tests/basic/smoke-test-logging.php
bengizmo d6211ee364 feat(testing): Implement HVAC_Test_User_Factory and update .gitignore
- 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.
2025-04-14 17:41:36 -03:00

36 lines
No EOL
1.1 KiB
PHP

<?php
/**
* Smoke test with logging for HVAC Community Events plugin
*/
file_put_contents(__DIR__.'/smoke-test.log', "Starting smoke test...\n", FILE_APPEND);
// Simulate WordPress environment
define('WP_DEBUG', true);
try {
// Load plugin directly
require_once dirname(dirname(__DIR__)) . '/hvac-community-events.php';
file_put_contents(__DIR__.'/smoke-test.log', "Plugin loaded successfully\n", FILE_APPEND);
// Verify plugin loaded
if (!class_exists('HVAC_Community_Events')) {
throw new Exception("Plugin class not loaded");
}
// Verify version constant
if (!defined('HVAC_CE_VERSION')) {
throw new Exception("Version constant not defined");
}
// Verify TEC functions available (mocked by test-doubles)
if (!function_exists('tribe_get_events')) {
throw new Exception("TEC functions not available");
}
file_put_contents(__DIR__.'/smoke-test.log', "PASS: All checks completed successfully\n", FILE_APPEND);
exit(0);
} catch (Exception $e) {
file_put_contents(__DIR__.'/smoke-test.log', "FAIL: " . $e->getMessage() . "\n", FILE_APPEND);
exit(1);
}