Files
michaelschiemer/tests/debug/test-search-component.php
Michael Schiemer fc3d7e6357 feat(Production): Complete production deployment infrastructure
- 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.
2025-10-25 19:18:37 +02:00

54 lines
1.8 KiB
PHP
Executable File

#!/usr/bin/env php
<?php
declare(strict_types=1);
require __DIR__ . '/../../vendor/autoload.php';
use App\Application\LiveComponents\SearchComponent;
echo "Testing SearchComponent Migration\n";
echo "==================================\n\n";
try {
$search = new SearchComponent(
id: 'search-test',
initialData: []
);
echo "✓ SearchComponent created successfully\n";
echo " - ID: " . $search->getId() . "\n\n";
// Test search() method
echo "Testing search() method...\n";
$result = $search->search('test', 'all');
echo " ✓ search() returns array: " . (is_array($result) ? 'YES' : 'NO') . "\n";
echo " - Keys: " . implode(', ', array_keys($result)) . "\n";
echo " - Query: " . $result['query'] . "\n";
echo " - Target: " . $result['target'] . "\n";
echo " - Result count: " . $result['result_count'] . "\n\n";
// Test clear() method
echo "Testing clear() method...\n";
$result = $search->clear();
echo " ✓ clear() returns array: " . (is_array($result) ? 'YES' : 'NO') . "\n";
echo " - Keys: " . implode(', ', array_keys($result)) . "\n";
echo " - Query: '" . $result['query'] . "'\n";
echo " - Result count: " . $result['result_count'] . "\n\n";
// Test changeTarget() method
echo "Testing changeTarget() method...\n";
$result = $search->changeTarget('users');
echo " ✓ changeTarget() returns array: " . (is_array($result) ? 'YES' : 'NO') . "\n";
echo " - Keys: " . implode(', ', array_keys($result)) . "\n";
echo " - Target: " . $result['target'] . "\n\n";
echo "==================================\n";
echo "✅ All SearchComponent tests passed!\n";
} catch (\Throwable $e) {
echo "❌ Error: " . $e->getMessage() . "\n";
echo " File: " . $e->getFile() . ":" . $e->getLine() . "\n";
exit(1);
}