Skip to content

Commit

Permalink
[homekit-connector][shelly-connector] Refactoring to configuration (#…
Browse files Browse the repository at this point in the history
…172)
  • Loading branch information
actions-user committed Nov 19, 2023
1 parent 8e620d9 commit d571fc6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tools/phpunit-bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

// phpcs:ignoreFile

if (!defined('FB_TEMP_DIR')) {
define('FB_TEMP_DIR', __DIR__ . '/../var/tools/PHPUnit/tmp');
}

if (!defined('FB_LOGS_DIR')) {
define('FB_LOGS_DIR', __DIR__ . '/../var/tools/PHPUnit/logs');
}
define('FB_APP_DIR', realpath(__DIR__ . '/..'));
define('FB_CONFIG_DIR', realpath(__DIR__ . '/../config'));
define('FB_VENDOR_DIR', realpath(__DIR__ . '/../vendor'));
is_string(getenv('TEST_TOKEN'))
? define('FB_TEMP_DIR', __DIR__ . '/../var/tools/PHPUnit/tmp/' . getmypid() . '-' . md5((string) time()) . '-' . getenv('TEST_TOKEN') ?? '')
: define('FB_TEMP_DIR', __DIR__ . '/../var/tools/PHPUnit/tmp/' . getmypid() . '-' . md5((string) time()));
is_string(getenv('TEST_TOKEN'))
? define('FB_LOGS_DIR', __DIR__ . '/../var/tools/PHPUnit/logs/' . getmypid() . '-' . md5((string) time()) . '-' . getenv('TEST_TOKEN') ?? '')
: define('FB_LOGS_DIR', __DIR__ . '/../var/tools/PHPUnit/logs/' . getmypid() . '-' . md5((string) time()));

if (@!include __DIR__ . '/../vendor/autoload.php') {
echo 'Install Tester using `composer update --dev`';
Expand Down

0 comments on commit d571fc6

Please sign in to comment.