-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathBase.php
More file actions
66 lines (53 loc) · 1.52 KB
/
Base.php
File metadata and controls
66 lines (53 loc) · 1.52 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
62
63
64
65
66
<?php
namespace Tests\E2E\Adapter;
use PHPUnit\Framework\TestCase;
use Tests\E2E\Adapter\Scopes\AttributeTests;
use Tests\E2E\Adapter\Scopes\CollectionTests;
use Tests\E2E\Adapter\Scopes\DocumentTests;
use Tests\E2E\Adapter\Scopes\GeneralTests;
use Tests\E2E\Adapter\Scopes\IndexTests;
use Tests\E2E\Adapter\Scopes\PermissionTests;
use Tests\E2E\Adapter\Scopes\RelationshipTests;
use Tests\E2E\Adapter\Scopes\SpatialTests;
use Utopia\Database\Database;
use Utopia\Database\Validator\Authorization;
\ini_set('memory_limit', '2048M');
abstract class Base extends TestCase
{
// use CollectionTests;
// use DocumentTests;
// use AttributeTests;
// use IndexTests;
// use PermissionTests;
// use RelationshipTests;
use SpatialTests;
use GeneralTests;
protected static string $namespace;
/**
* @return Database
*/
abstract protected static function getDatabase(): Database;
/**
* @param string $collection
* @param string $column
*
* @return bool
*/
abstract protected static function deleteColumn(string $collection, string $column): bool;
/**
* @param string $collection
* @param string $index
*
* @return bool
*/
abstract protected static function deleteIndex(string $collection, string $index): bool;
public function setUp(): void
{
Authorization::setRole('any');
}
public function tearDown(): void
{
Authorization::setDefaultStatus(true);
}
protected string $testDatabase = 'utopiaTests';
}