This commit is contained in:
23
tests/bin/seed-test-db.php
Normal file
23
tests/bin/seed-test-db.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?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";
|
||||
Reference in New Issue
Block a user