Skip to content

Commit 0bc9bff

Browse files
committed
Remove dead/obsolete code
1 parent fa4b8df commit 0bc9bff

File tree

1 file changed

+0
-87
lines changed

1 file changed

+0
-87
lines changed

tests/integration/bootstrap.php

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -6,94 +6,7 @@
66

77
require_once __DIR__ . '/../../vendor/autoload.php';
88

9-
// Define constants for integration testing
10-
define('INTEGRATION_TEST_ROOT', __DIR__);
119
define('PROJECT_ROOT', __DIR__ . '/../..');
1210

1311
$dotenv = Dotenv\Dotenv::createImmutable(PROJECT_ROOT);
1412
$dotenv->load();
15-
16-
// // Load environment variables for integration testing
17-
// $envFile = __DIR__ . '/../bats/.env-test';
18-
// if (file_exists($envFile)) {
19-
// $envContent = file_get_contents($envFile);
20-
// $envLines = explode("\n", $envContent);
21-
22-
// foreach ($envLines as $line) {
23-
// $line = trim($line);
24-
// if (empty($line) || strpos($line, '#') === 0 || strpos($line, 'export') !== 0) {
25-
// continue;
26-
// }
27-
28-
// // Remove 'export ' prefix and parse key=value
29-
// $line = substr($line, 7); // Remove 'export '
30-
// if (strpos($line, '=') !== false) {
31-
// [$key, $value] = explode('=', $line, 2);
32-
// // Remove quotes if present
33-
// $value = trim($value, '"\'');
34-
// $_ENV[$key] = $value;
35-
// putenv("$key=$value");
36-
// }
37-
// }
38-
// }
39-
40-
// // Load local environment files
41-
// $localEnvFiles = [PROJECT_ROOT . '/.env-local', PROJECT_ROOT . '/.env'];
42-
// foreach ($localEnvFiles as $envFile) {
43-
// if (file_exists($envFile)) {
44-
// $envContent = file_get_contents($envFile);
45-
// $envLines = explode("\n", $envContent);
46-
47-
// foreach ($envLines as $line) {
48-
// $line = trim($line);
49-
// if (empty($line) || strpos($line, '#') === 0) {
50-
// continue;
51-
// }
52-
53-
// if (strpos($line, '=') !== false) {
54-
// [$key, $value] = explode('=', $line, 2);
55-
// // Remove quotes if present
56-
// $value = trim($value, '"\'');
57-
// $_ENV[$key] = $value;
58-
// putenv("$key=$value");
59-
// }
60-
// }
61-
// break; // Use first found env file
62-
// }
63-
// }
64-
65-
// Set default values if not defined
66-
if (!isset($_ENV['HOSTNAME'])) {
67-
$_ENV['HOSTNAME'] = '127.0.0.1:8080';
68-
putenv('HOSTNAME=127.0.0.1:8080');
69-
}
70-
71-
if (!isset($_ENV['FOLDER_PREFIX'])) {
72-
$_ENV['FOLDER_PREFIX'] = './tmp/functionality-parallel';
73-
putenv('FOLDER_PREFIX=./tmp/functionality-parallel');
74-
}
75-
76-
if (!isset($_ENV['TESTUSER'])) {
77-
$_ENV['TESTUSER'] = 'testuser';
78-
putenv('TESTUSER=testuser');
79-
}
80-
81-
if (!isset($_ENV['TESTUSER_PASSWORD'])) {
82-
$_ENV['TESTUSER_PASSWORD'] = 'myfancysecurepassword234';
83-
putenv('TESTUSER_PASSWORD=myfancysecurepassword234');
84-
}
85-
86-
if (!isset($_ENV['EICAR_STRING'])) {
87-
$_ENV['EICAR_STRING'] = 'X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*';
88-
putenv('EICAR_STRING=X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*');
89-
}
90-
91-
if (!isset($_ENV['CLEAN_STRING'])) {
92-
$_ENV['CLEAN_STRING'] = 'nothingwronghere';
93-
putenv('CLEAN_STRING=nothingwronghere');
94-
}
95-
96-
if (!isset($_ENV['DOCKER_EXEC_WITH_USER'])) {
97-
$_ENV['DOCKER_EXEC_WITH_USER'] = 'docker exec --env XDEBUG_MODE=off --user www-data';
98-
putenv('DOCKER_EXEC_WITH_USER=docker exec --env XDEBUG_MODE=off --user www-data');
99-
}

0 commit comments

Comments
 (0)