- Full gg.deals-style UI: deal feed with filters, game pages with price history charts, rankings, vouchers, news, prepaids, subscriptions, bundles, franchises, wishlist, API docs - Real data crawlers: * gg:crawl (Steam Store API + GOG Catalog + Epic free games) * gg:catalog (252K game slugs from gg.deals sitemaps) * gg:ggdeals (per-game prices via FlareSolverr session, JSON-LD parsing) * gg:seed / gg:crawl-covers (demo seed + Steam CDN cover art) - 24/7 self-updating scheduler (scripts/scheduler_loop.php, lockfile-protected) - Tailwind v4 dark/light theme, Alpine.js, Chart.js
50 lines
1.4 KiB
PHP
50 lines
1.4 KiB
PHP
<?php
|
|
|
|
use CodeIgniter\Test\CIUnitTestCase;
|
|
use Config\App;
|
|
use Tests\Support\Libraries\ConfigReader;
|
|
|
|
/**
|
|
* @internal
|
|
*/
|
|
final class HealthTest extends CIUnitTestCase
|
|
{
|
|
public function testIsDefinedAppPath(): void
|
|
{
|
|
$this->assertTrue(defined('APPPATH'));
|
|
}
|
|
|
|
public function testBaseUrlHasBeenSet(): void
|
|
{
|
|
$validation = service('validation');
|
|
|
|
$env = false;
|
|
|
|
// Check the baseURL in .env
|
|
if (is_file(HOMEPATH . '.env')) {
|
|
$env = preg_grep('/^app\.baseURL = ./', file(HOMEPATH . '.env')) !== false;
|
|
}
|
|
|
|
if ($env) {
|
|
// BaseURL in .env is a valid URL?
|
|
// phpunit.dist.xml sets app.baseURL in $_SERVER
|
|
// So if you set app.baseURL in .env, it takes precedence
|
|
$config = new App();
|
|
$this->assertTrue(
|
|
$validation->check($config->baseURL, 'valid_url'),
|
|
'baseURL "' . $config->baseURL . '" in .env is not valid URL',
|
|
);
|
|
}
|
|
|
|
// Get the baseURL in app/Config/App.php
|
|
// You can't use Config\App, because phpunit.dist.xml sets app.baseURL
|
|
$reader = new ConfigReader();
|
|
|
|
// BaseURL in app/Config/App.php is a valid URL?
|
|
$this->assertTrue(
|
|
$validation->check($reader->baseURL, 'valid_url'),
|
|
'baseURL "' . $reader->baseURL . '" in app/Config/App.php is not valid URL',
|
|
);
|
|
}
|
|
}
|