- Add comprehensive health check system with multiple endpoints - Add Prometheus metrics endpoint - Add production logging configurations (5 strategies) - Add complete deployment documentation suite: * QUICKSTART.md - 30-minute deployment guide * DEPLOYMENT_CHECKLIST.md - Printable verification checklist * DEPLOYMENT_WORKFLOW.md - Complete deployment lifecycle * PRODUCTION_DEPLOYMENT.md - Comprehensive technical reference * production-logging.md - Logging configuration guide * ANSIBLE_DEPLOYMENT.md - Infrastructure as Code automation * README.md - Navigation hub * DEPLOYMENT_SUMMARY.md - Executive summary - Add deployment scripts and automation - Add DEPLOYMENT_PLAN.md - Concrete plan for immediate deployment - Update README with production-ready features All production infrastructure is now complete and ready for deployment.
73 lines
2.7 KiB
PHP
Executable File
73 lines
2.7 KiB
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
require __DIR__ . '/../../vendor/autoload.php';
|
|
|
|
use App\Application\LiveComponents\ModalComponent;
|
|
|
|
echo "Testing ModalComponent Migration\n";
|
|
echo "==================================\n\n";
|
|
|
|
try {
|
|
$modal = new ModalComponent(
|
|
id: 'modal-test',
|
|
initialData: []
|
|
);
|
|
|
|
echo "✓ ModalComponent created successfully\n";
|
|
echo " - ID: " . $modal->getId() . "\n\n";
|
|
|
|
// Test open() method
|
|
echo "Testing open() method...\n";
|
|
$result = $modal->open('Test Modal', 'Test content', 'medium', []);
|
|
echo " ✓ open() returns array: " . (is_array($result) ? 'YES' : 'NO') . "\n";
|
|
echo " - Is open: " . ($result['is_open'] ? 'true' : 'false') . "\n";
|
|
echo " - Title: " . $result['title'] . "\n";
|
|
echo " - Size: " . $result['size'] . "\n\n";
|
|
|
|
// Test close() method
|
|
echo "Testing close() method...\n";
|
|
$result = $modal->close();
|
|
echo " ✓ close() returns array: " . (is_array($result) ? 'YES' : 'NO') . "\n";
|
|
echo " - Is open: " . ($result['is_open'] ? 'true' : 'false') . "\n\n";
|
|
|
|
// Test updateContent() method
|
|
echo "Testing updateContent() method...\n";
|
|
$result = $modal->updateContent('Updated content');
|
|
echo " ✓ updateContent() returns array: " . (is_array($result) ? 'YES' : 'NO') . "\n";
|
|
echo " - Content: " . $result['content'] . "\n\n";
|
|
|
|
// Test changeSize() method
|
|
echo "Testing changeSize() method...\n";
|
|
$result = $modal->changeSize('large');
|
|
echo " ✓ changeSize() returns array: " . (is_array($result) ? 'YES' : 'NO') . "\n";
|
|
echo " - Size: " . $result['size'] . "\n\n";
|
|
|
|
// Test confirm() method
|
|
echo "Testing confirm() method...\n";
|
|
$result = $modal->confirm('Confirm Action', 'Are you sure?');
|
|
echo " ✓ confirm() returns array: " . (is_array($result) ? 'YES' : 'NO') . "\n";
|
|
echo " - Is open: " . ($result['is_open'] ? 'true' : 'false') . "\n";
|
|
echo " - Title: " . $result['title'] . "\n";
|
|
echo " - Modal type: " . $result['modal_type'] . "\n";
|
|
echo " - Buttons: " . count($result['buttons']) . "\n\n";
|
|
|
|
// Test alert() method
|
|
echo "Testing alert() method...\n";
|
|
$result = $modal->alert('Success', 'Operation completed', 'success');
|
|
echo " ✓ alert() returns array: " . (is_array($result) ? 'YES' : 'NO') . "\n";
|
|
echo " - Is open: " . ($result['is_open'] ? 'true' : 'false') . "\n";
|
|
echo " - Title: " . $result['title'] . "\n";
|
|
echo " - Modal type: " . $result['modal_type'] . "\n\n";
|
|
|
|
echo "==================================\n";
|
|
echo "✅ All ModalComponent tests passed!\n";
|
|
|
|
} catch (\Throwable $e) {
|
|
echo "❌ Error: " . $e->getMessage() . "\n";
|
|
echo " File: " . $e->getFile() . ":" . $e->getLine() . "\n";
|
|
exit(1);
|
|
}
|