Skip to content

Commit 86e64ed

Browse files
committed
skip test generation for abstract types
1 parent 713fec7 commit 86e64ed

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Builder.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,20 @@ public function renderTestClasses(): void
153153
if (null !== $this->config->getTestEndpoint()) {
154154
$testTypes[] = PHPFHIR_TEST_TYPE_INTEGRATION;
155155
}
156-
foreach ($testTypes as $testType) {
157-
foreach ($types->getIterator() as $type) {
156+
foreach ($types->getIterator() as $type) {
157+
158+
// skip "abstract" types
159+
if ($type->isAbstract()) {
160+
continue;
161+
}
162+
163+
foreach ($testTypes as $testType) {
164+
// skip domain resources
165+
// TODO(@dcarbone): why did you do this.
158166
if (PHPFHIR_TEST_TYPE_INTEGRATION === $testType && !$type->isDomainResource()) {
159167
continue;
160168
}
169+
161170
$log->debug("Generated {$testType} test class for type {$type}...");
162171
$classDefinition = Templates::renderTypeTestClass($this->config, $types, $type, $testType);
163172
$filepath = FileUtils::buildTypeTestFilePath($this->config, $type, $testType);

0 commit comments

Comments
 (0)