This commit is contained in:
Shish 2024-01-15 23:04:19 +00:00
parent 321cb62400
commit e507105212
2 changed files with 14 additions and 1 deletions

View file

@ -12,6 +12,9 @@ if(class_exists("\\PHPUnit\\Framework\\TestCase")) {
protected static string $user_name = "test";
protected string $wipe_time = "test";
/**
* Start a DB transaction for each test class
*/
public static function setUpBeforeClass(): void
{
global $_tracer, $database;
@ -20,6 +23,9 @@ if(class_exists("\\PHPUnit\\Framework\\TestCase")) {
parent::setUpBeforeClass();
}
/**
* Start a savepoint for each test
*/
public function setUp(): void
{
global $database, $_tracer;

View file

@ -1,5 +1,12 @@
<?php
/**
* Sets up a base test environment:
* - Loads the code
* - Runs the installer
* - Runs the database upgrade
* - Creates test users
* - Commits the database transaction
*/
declare(strict_types=1);
namespace Shimmie2;