Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/optimise test suite #5341

Draft
wants to merge 4 commits into
base: 9.0
Choose a base branch
from

Conversation

mhsdesign
Copy link
Member

Upgrade instructions

Review instructions

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions


class ContentRepositoryInternalsAccessor implements ContentRepositoryServiceFactoryInterface
{
public ContentRepositoryServiceFactoryDependencies $spiedInternals;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: expose (just) the required dependencies as explicit public readonly fields

@@ -57,6 +57,7 @@ public function resetContentRepositoryComponents(BeforeScenarioScope $scope): vo
}

protected function getContentRepositoryService(
ContentRepositoryId $contentRepositoryId,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering: why do we have to change the signature? Can't we just refer to currentContentRepository?

@@ -133,7 +133,7 @@ public function build(ContentRepositoryServiceFactoryDependencies $serviceFactor
};
}
};
$this->getContentRepositoryService($propertyConverterAccess);
$this->getContentRepositoryService($this->currentContentRepository->id, $propertyConverterAccess);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that exactly one of the hacks we should be able to replace now?

$propertyConverter = $this->getContentRepositoryServiceFactoryDependencies($this->currentContentRepository->id)->propertyConverter;

Copy link
Member

@bwaidelich bwaidelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhsdesign a short explanation in the PR and this is good to go, no?

@bwaidelich
Copy link
Member

@mhsdesign this PR would help me. Should I take over or can you take care of the remaining tweaks?

@bwaidelich
Copy link
Member

ping :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants