upskill-event-manager/wordpress-dev/tests/basic/run-tests-modified.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

41 lines
No EOL
1,007 B
PHP

<?php
/**
* Modified script to run basic functionality tests
*/
// Set error reporting
error_reporting(E_ALL);
ini_set('display_errors', 1);
// Load PHPUnit from plugin vendor directory
require_once dirname(dirname(__DIR__)) . '/vendor/autoload.php';
// Load test bootstrap
require_once __DIR__ . '/bootstrap.php';
// Create test suite
$suite = new PHPUnit\Framework\TestSuite();
// Add test cases
$suite->addTestFile(__DIR__ . '/test-basic-functionality.php');
// Create test runner
$runner = new PHPUnit\TextUI\TestRunner();
// Run tests and get result
try {
$result = $runner->run($suite);
// Output results
echo "\nTest Results:\n";
echo "Tests: " . $result->count() . "\n";
echo "Failures: " . $result->failureCount() . "\n";
echo "Errors: " . $result->errorCount() . "\n";
// Set exit code based on result
exit($result->wasSuccessful() ? 0 : 1);
} catch (Exception $e) {
echo "Error running tests: " . $e->getMessage() . "\n";
exit(1);
}