24 lines
475 B
PHP
24 lines
475 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* Seed the project uploads/ database for local dev and Playwright E2E runs.
|
|
*
|
|
* Usage: php tests/bin/seed-test-db.php
|
|
*/
|
|
|
|
$root = dirname(__DIR__, 2);
|
|
|
|
require_once $root . '/vendor/autoload.php';
|
|
|
|
putenv('QDB_MASTER_KEY=dGVzdC1tYXN0ZXIta2V5LXRoaXQtMzJieXRzIQ==');
|
|
|
|
if (!defined('QDB_TESTING')) {
|
|
define('QDB_TESTING', false);
|
|
}
|
|
|
|
\Tests\Support\DatabaseFixture::forE2E($root)->reset();
|
|
|
|
echo "Test database seeded in uploads/\n";
|