1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Xmf\Test\Database; |
6
|
|
|
|
7
|
|
|
use PHPUnit\Framework\TestCase; |
|
|
|
|
8
|
|
|
use Xmf\Database\Migrate; |
9
|
|
|
|
10
|
|
|
require_once dirname(__DIR__, 4) . '/init_new.php'; |
11
|
|
|
|
12
|
|
|
require_once(XOOPS_TU_ROOT_PATH . '/class/logger/xoopslogger.php'); |
13
|
|
|
require_once(XOOPS_TU_ROOT_PATH . '/class/xoopsload.php'); |
14
|
|
|
require_once(XOOPS_TU_ROOT_PATH . '/class/preload.php'); |
15
|
|
|
require_once(XOOPS_TU_ROOT_PATH . '/class/database/databasefactory.php'); |
16
|
|
|
|
17
|
|
|
require_once(XOOPS_TU_ROOT_PATH . '/include/functions.php'); |
18
|
|
|
require_once(XOOPS_TU_ROOT_PATH . '/kernel/object.php'); |
19
|
|
|
|
20
|
|
|
require_once(XOOPS_TU_ROOT_PATH . '/class/module.textsanitizer.php'); |
21
|
|
|
|
22
|
|
|
class MigrateTest extends TestCase |
23
|
|
|
{ |
24
|
|
|
/** |
25
|
|
|
* @var Migrate |
26
|
|
|
*/ |
27
|
|
|
protected $object; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Sets up the fixture, for example, opens a network connection. |
31
|
|
|
* This method is called before a test is executed. |
32
|
|
|
*/ |
33
|
|
|
protected function setUp(): void |
34
|
|
|
{ |
35
|
|
|
$this->object = new Migrate('profile'); |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* Tears down the fixture, for example, closes a network connection. |
40
|
|
|
* This method is called after a test is executed. |
41
|
|
|
*/ |
42
|
|
|
protected function tearDown(): void |
43
|
|
|
{ |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
public function testContracts() |
47
|
|
|
{ |
48
|
|
|
$this->assertInstanceOf(Migrate::class, $this->object); |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
public function testSaveCurrentSchema() |
52
|
|
|
{ |
53
|
|
|
// Remove the following lines when you implement this test. |
54
|
|
|
$this->markTestIncomplete( |
55
|
|
|
'This test has not been implemented yet.' |
56
|
|
|
); |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
public function testGetCurrentSchema() |
60
|
|
|
{ |
61
|
|
|
// Remove the following lines when you implement this test. |
62
|
|
|
$this->markTestIncomplete( |
63
|
|
|
'This test has not been implemented yet.' |
64
|
|
|
); |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
public function testGetTargetDefinitions() |
68
|
|
|
{ |
69
|
|
|
// Remove the following lines when you implement this test. |
70
|
|
|
$this->markTestIncomplete( |
71
|
|
|
'This test has not been implemented yet.' |
72
|
|
|
); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
public function testSynchronizeSchema() |
76
|
|
|
{ |
77
|
|
|
// Remove the following lines when you implement this test. |
78
|
|
|
$this->markTestIncomplete( |
79
|
|
|
'This test has not been implemented yet.' |
80
|
|
|
); |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
public function testGetSynchronizeDDL() |
84
|
|
|
{ |
85
|
|
|
// Remove the following lines when you implement this test. |
86
|
|
|
$this->markTestIncomplete( |
87
|
|
|
'This test has not been implemented yet.' |
88
|
|
|
); |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
public function testGetLastError() |
92
|
|
|
{ |
93
|
|
|
$actual = $this->object->getLastError(); |
94
|
|
|
$this->assertNull($actual); |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
public function testGetLastErrNo() |
98
|
|
|
{ |
99
|
|
|
$actual = $this->object->getLastErrNo(); |
100
|
|
|
$this->assertNull($actual); |
101
|
|
|
} |
102
|
|
|
} |
103
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths