forked from codeigniter4/CodeIgniter4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDatabaseTestCase.php
More file actions
61 lines (50 loc) · 1.36 KB
/
Copy pathDatabaseTestCase.php
File metadata and controls
61 lines (50 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
namespace Tests\Support;
use CodeIgniter\Test\CIUnitTestCase;
use CodeIgniter\Test\DatabaseTestTrait;
/**
* @internal
*/
final class DatabaseTestCase extends CIUnitTestCase
{
use DatabaseTestTrait;
/**
* Should the database be refreshed before each test?
*
* @var bool
*/
protected $refresh = true;
/**
* The seed file(s) used for all tests within this test case.
* Should be fully-namespaced or relative to $basePath
*
* @var array|string
*/
protected $seed = 'Tests\Support\Database\Seeds\ExampleSeeder';
/**
* The path to the seeds directory.
* Allows overriding the default application directories.
*
* @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)
*
* @var array|string|null
*/
protected $namespace = 'Tests\Support';
protected function setUp(): void
{
parent::setUp();
// Extra code to run before each test
}
protected function tearDown(): void
{
parent::tearDown();
// Extra code to run after each test
}
}