loreal-global-kickoff/test-csv.php
DJP 5fb6e1957d Add debug logging and fix test files
- Added error_log debugging to process-csv.php
- Fixed test-csv.php syntax (removed use statements in code)
- Created test-process2.php for step-by-step class loading test
- All service classes load successfully in tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 17:16:21 -05:00

62 lines
1.7 KiB
PHP

<?php
/**
* Test CSV Dependencies
*/
error_reporting(E_ALL);
ini_set('display_errors', 1);
echo "<h1>Testing CSV Dependencies</h1>";
echo "<h2>1. Autoload</h2>";
try {
require_once __DIR__ . '/vendor/autoload.php';
echo "✅ Autoload successful<br>";
} catch (Exception $e) {
echo "❌ Autoload failed: " . $e->getMessage() . "<br>";
exit;
}
echo "<h2>2. League CSV</h2>";
echo "✅ League\\Csv\\Reader exists: " . (class_exists('League\Csv\Reader') ? 'YES' : 'NO') . "<br>";
echo "✅ League\\Csv\\Writer exists: " . (class_exists('League\Csv\Writer') ? 'YES' : 'NO') . "<br>";
echo "<h2>3. Carbon</h2>";
echo "✅ Carbon exists: " . (class_exists('Carbon\Carbon') ? 'YES' : 'NO') . "<br>";
try {
$date = \Carbon\Carbon::now();
echo "✅ Carbon test: " . $date->format('Y-m-d H:i:s') . "<br>";
} catch (Exception $e) {
echo "❌ Carbon error: " . $e->getMessage() . "<br>";
}
echo "<h2>4. CSVTransformer</h2>";
try {
require_once __DIR__ . '/CSVTransformer.php';
$transformer = new CSVTransformer();
echo "✅ CSVTransformer loaded<br>";
} catch (Exception $e) {
echo "❌ CSVTransformer error: " . $e->getMessage() . "<br>";
echo "<pre>" . $e->getTraceAsString() . "</pre>";
}
echo "<h2>5. OMGService</h2>";
try {
require_once __DIR__ . '/OMGService.php';
$omg = new OMGService();
echo "✅ OMGService loaded<br>";
} catch (Exception $e) {
echo "❌ OMGService error: " . $e->getMessage() . "<br>";
}
echo "<h2>6. EmailService</h2>";
try {
require_once __DIR__ . '/EmailService.php';
$email = new EmailService();
echo "✅ EmailService loaded<br>";
} catch (Exception $e) {
echo "❌ EmailService error: " . $e->getMessage() . "<br>";
}
echo "<h2>All tests complete!</h2>";