Skip to content

Commit

Permalink
Pass env vars to functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellmarkoff committed Feb 12, 2024
1 parent 55247ae commit c41c76b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="./tests/config/bootstrap.php"
colors="true">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" bootstrap="./tests/config/bootstrap.php" colors="true">
<testsuites>
<testsuite name="functional">
<directory suffix="Test.php">tests/Functional/</directory>
</testsuite>
</testsuites>
<coverage
processUncoveredFiles="true"
cacheDirectory="reports">
<coverage processUncoveredFiles="true" cacheDirectory="reports">
<include>
<directory suffix="Command.php">src/Commands</directory>
</include>
Expand All @@ -19,10 +14,15 @@
<testdoxXml outputFile="reports/logfile.xml"/>
</logging>
<php>
<server name="TERMINUS_TOKEN" value="${TERMINUS_TOKEN}" />
<server name="TERMINUS_SITE" value="${TERMINUS_SITE}" />
<server name="TERMINUS_SITE_WP" value="${TERMINUS_SITE}" />
<server name="TERMINUS_SITE_WP_NETWORK" value="${TERMINUS_SITE}" />
<server name="TERMINUS_ORG" value="${TERMINUS_ORG}" />
<server name="TERMINUS_TOKEN" value="${TERMINUS_TOKEN}" />
<server name="TERMINUS_SITE" value="${TERMINUS_SITE}" />
<server name="TERMINUS_SITE_WP" value="${TERMINUS_SITE}" />
<server name="TERMINUS_SITE_WP_NETWORK" value="${TERMINUS_SITE}" />
<server name="TERMINUS_ORG" value="${TERMINUS_ORG}" />
<server name="TERMINUS_HOST" value="${TERMINUS_HOST}" />
<server name="TERMINUS_PORT" value="${TERMINUS_PORT}" />
<server name="PANTHEON_CERT" value="${PANTHEON_CERT}" />
<server name="TERMINUS_VERIFY_HOST_CERT" value="${TERMINUS_VERIFY_HOST_CERT}" />
<server name="TERMINUS_CACHE_DIR" value="${TERMINUS_CACHE_DIR}" />
</php>
</phpunit>
2 changes: 1 addition & 1 deletion tests/Functional/TerminusTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected static function callTerminus(
string $command,
?string $pipeInput = null
): array {
$procCommand = sprintf('%s %s', TERMINUS_BIN_FILE, $command);
$procCommand = sprintf('TERMINUS_HOST=%s %s %s', getEnv("TERMINUS_HOST"), TERMINUS_BIN_FILE, $command);
if (null !== $pipeInput) {
$procCommand = sprintf('%s | %s', $pipeInput, $procCommand);
}
Expand Down

0 comments on commit c41c76b

Please sign in to comment.