Skip to content

Commit eb30a96

Browse files
committed
fix(ci): define Firebird constants before loading configuration
1 parent 47a86ef commit eb30a96

2 files changed

Lines changed: 25 additions & 5 deletions

File tree

composer.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,5 @@
77
"phpunit/phpunit": "^10.5"
88
},
99
"autoload": {
10-
"files": [
11-
"inc/configuration.inc.php",
12-
"inc/functions.inc.php",
13-
"inc/firebird.inc.php"
14-
]
1510
}
1611
}

tests/bootstrap.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,31 @@
2020
// Load Composer autoloader
2121
require_once __DIR__ . '/../vendor/autoload.php';
2222

23+
// Define Firebird constants if the extension is not loaded
24+
if (!defined('IBASE_COMMITTED')) {
25+
define('IBASE_COMMITTED', 8);
26+
}
27+
if (!defined('IBASE_NOWAIT')) {
28+
define('IBASE_NOWAIT', 256);
29+
}
30+
if (!defined('IBASE_READ')) {
31+
define('IBASE_READ', 2);
32+
}
33+
if (!defined('IBASE_WRITE')) {
34+
define('IBASE_WRITE', 4);
35+
}
36+
if (!defined('IBASE_STS_HDR_PAGES')) {
37+
define('IBASE_STS_HDR_PAGES', 1);
38+
}
39+
if (!defined('IBASE_TEXT')) {
40+
define('IBASE_TEXT', 1);
41+
}
42+
43+
// Load project files manually in correct order after constants are defined
44+
require_once __DIR__ . '/../inc/configuration.inc.php';
45+
require_once __DIR__ . '/../inc/functions.inc.php';
46+
require_once __DIR__ . '/../inc/firebird.inc.php';
47+
2348
// Load language file needed for some tests
2449
if (!defined('LANGUAGE')) {
2550
define('LANGUAGE', 'english');

0 commit comments

Comments
 (0)