comments
This commit is contained in:
parent
321cb62400
commit
e507105212
2 changed files with 14 additions and 1 deletions
|
@ -12,6 +12,9 @@ if(class_exists("\\PHPUnit\\Framework\\TestCase")) {
|
||||||
protected static string $user_name = "test";
|
protected static string $user_name = "test";
|
||||||
protected string $wipe_time = "test";
|
protected string $wipe_time = "test";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start a DB transaction for each test class
|
||||||
|
*/
|
||||||
public static function setUpBeforeClass(): void
|
public static function setUpBeforeClass(): void
|
||||||
{
|
{
|
||||||
global $_tracer, $database;
|
global $_tracer, $database;
|
||||||
|
@ -20,6 +23,9 @@ if(class_exists("\\PHPUnit\\Framework\\TestCase")) {
|
||||||
parent::setUpBeforeClass();
|
parent::setUpBeforeClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start a savepoint for each test
|
||||||
|
*/
|
||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
global $database, $_tracer;
|
global $database, $_tracer;
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
<?php
|
<?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);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shimmie2;
|
namespace Shimmie2;
|
||||||
|
|
Reference in a new issue