Skip to content

Commit

Permalink
lil test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone committed Jan 21, 2025
1 parent 6b6d372 commit a9ef09f
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 18 deletions.
4 changes: 2 additions & 2 deletions phpunit/Core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
</php>
<testsuites>
<testsuite name="Core">
<directory>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Tests</directory>
<exclude>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Tests/Versions</exclude>
<directory>../output/tests/Tests/DCarbone/PHPFHIRGenerated</directory>
<exclude>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Versions</exclude>
</testsuite>
</testsuites>
</phpunit>
2 changes: 1 addition & 1 deletion phpunit/DSTU1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</php>
<testsuites>
<testsuite name="DSTU1">
<directory>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Versions/DSTU1/Tests</directory>
<directory>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Versions/DSTU1</directory>
</testsuite>
</testsuites>
</phpunit>
2 changes: 1 addition & 1 deletion phpunit/DSTU2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</php>
<testsuites>
<testsuite name="DSTU2">
<directory>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Versions/DSTU2/Tests</directory>
<directory>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Versions/DSTU2</directory>
</testsuite>
</testsuites>
</phpunit>
2 changes: 1 addition & 1 deletion phpunit/R4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</php>
<testsuites>
<testsuite name="R4">
<directory>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Versions/R4/Tests</directory>
<directory>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Versions/R4</directory>
</testsuite>
</testsuites>
</phpunit>
2 changes: 1 addition & 1 deletion phpunit/R4B.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</php>
<testsuites>
<testsuite name="R4B">
<directory>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Versions/R4B/Tests</directory>
<directory>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Versions/R4B</directory>
</testsuite>
</testsuites>
</phpunit>
2 changes: 1 addition & 1 deletion phpunit/R5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</php>
<testsuites>
<testsuite name="R5">
<directory>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Versions/R5/Tests</directory>
<directory>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Versions/R5</directory>
</testsuite>
</testsuites>
</phpunit>
2 changes: 1 addition & 1 deletion phpunit/STU3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</php>
<testsuites>
<testsuite name="STU3">
<directory>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Versions/STU3/Tests</directory>
<directory>../output/tests/Tests/DCarbone/PHPFHIRGenerated/Versions/STU3</directory>
</testsuite>
</testsuites>
</phpunit>
11 changes: 1 addition & 10 deletions phpunit/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
const PHPFHIR_TEST_CONFIG_ROOT_DIR = __DIR__;
const PHPFHIR_TEST_CONFIG_FILE = PHPFHIR_TEST_CONFIG_ROOT_DIR . '/config.php';
const PHPFHIR_TEST_COMPOSER_AUTOLOADER_PATH = PHPFHIR_TEST_CONFIG_ROOT_DIR . '/../vendor/autoload.php';
const PHPFHIR_TEST_RESOURCE_DOWNLOAD_DIR = PHPFHIR_TEST_CONFIG_ROOT_DIR . '/../output/tests/resources';
const PHPFHIR_TETS_GENERATED_AUTOLOADER_PATH = PHPFHIR_TEST_CONFIG_ROOT_DIR . '/../output/DCarbone/PHPFHIRGenerated/Autoloader.php';

putenv('PHPFHIR_TEST_RESOURCE_DOWNLOAD_DIR=' . PHPFHIR_TEST_RESOURCE_DOWNLOAD_DIR);
const PHPFHIR_TETS_GENERATED_AUTOLOADER_PATH = PHPFHIR_TEST_CONFIG_ROOT_DIR . '/../output/src/DCarbone/PHPFHIRGenerated/Autoloader.php';

// require generator autoloader
(function () {
Expand All @@ -40,12 +37,6 @@
$builder->render();
})();

// ensure test resource download directory exists
echo 'Creating test resource download dir: ' . PHPFHIR_TEST_RESOURCE_DOWNLOAD_DIR . PHP_EOL;
if (!is_dir(PHPFHIR_TEST_RESOURCE_DOWNLOAD_DIR) && !mkdir(PHPFHIR_TEST_RESOURCE_DOWNLOAD_DIR, 0755, true)) {
throw new \RuntimeException(sprintf('Failed to create test resource download directory: %s', PHPFHIR_TEST_RESOURCE_DOWNLOAD_DIR));
}

// require generated autoloader
(function () {
$generated_autoloader = realpath(PHPFHIR_TETS_GENERATED_AUTOLOADER_PATH);
Expand Down

0 comments on commit a9ef09f

Please sign in to comment.