-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_compile.php
More file actions
32 lines (27 loc) · 1.07 KB
/
test_compile.php
File metadata and controls
32 lines (27 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env php
<?php
/**
* Compile test - ensures all classes can be loaded and instantiated
*/
require_once __DIR__ . '/cli/vendor/autoload.php';
echo "Testing compilation and loading of streaming components...\n\n";
// Test instantiation of StreamingDatabaseClient
try {
$http = new \Localpoc\Http();
$client = new \Localpoc\StreamingDatabaseClient($http, 'https://example.com', 'test-key');
echo "✅ StreamingDatabaseClient instantiated successfully\n";
} catch (Exception $e) {
echo "❌ Failed to instantiate StreamingDatabaseClient: " . $e->getMessage() . "\n";
exit(1);
}
// Test that DownloadOrchestrator can be instantiated
try {
$extractor = new \Localpoc\BatchZipExtractor();
$downloader = new \Localpoc\ConcurrentDownloader($extractor);
$orchestrator = new \Localpoc\DownloadOrchestrator($downloader);
echo "✅ DownloadOrchestrator instantiated successfully\n";
} catch (Exception $e) {
echo "❌ Failed to instantiate DownloadOrchestrator: " . $e->getMessage() . "\n";
exit(1);
}
echo "\n✅ All compilation tests passed!\n";