Newer
Older

Yassine Doghri
committed
<?php

Yassine Doghri
committed
declare(strict_types=1);

Yassine Doghri
committed
namespace Tests\Support;
use CodeIgniter\Test\CIUnitTestCase;
use CodeIgniter\Test\DatabaseTestTrait;
use Tests\Support\Database\Seeds\ExampleSeeder;

Yassine Doghri
committed
/**
* @phpstan-ignore-next-line
*/

Yassine Doghri
committed
class DatabaseTestCase extends CIUnitTestCase

Yassine Doghri
committed
use DatabaseTestTrait;

Yassine Doghri
committed
/**
* Should the database be refreshed before each test?
*
* @var boolean
*/
protected $refresh = true;
/**
* The seed file(s) used for all tests within this test case. Should be fully-namespaced or relative to $basePath

Yassine Doghri
committed
*
* @var string|string[]

Yassine Doghri
committed
*/
protected $seed = ExampleSeeder::class;

Yassine Doghri
committed
/**
* The path to the seeds directory. Allows overriding the default application directories.

Yassine Doghri
committed
*
* @var string
*/
protected $basePath = SUPPORTPATH . 'Database/';
/**
* The namespace(s) to help us find the migration classes. Empty is equivalent to running `spark migrate -all`. Note
* that running "all" runs migrations in date order, but specifying namespaces runs them in namespace order (then
* date)

Yassine Doghri
committed
*
* @var string|string[]|null

Yassine Doghri
committed
*/
protected $namespace = 'Tests\Support';
protected function setUp(): void

Yassine Doghri
committed
{
parent::setUp();
// Extra code to run before each test
}
protected function tearDown(): void

Yassine Doghri
committed
{
parent::tearDown();
// Extra code to run after each test
}