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] Avoid RenderingContextFixture #761

Merged
merged 1 commit into from
May 10, 2023
Merged

[TASK] Avoid RenderingContextFixture #761

merged 1 commit into from
May 10, 2023

Conversation

lolli42
Copy link
Member

@lolli42 lolli42 commented May 10, 2023

Lots of test subjects carry the rendering
context around and access it to perform
things.

The "god" test fixture RenderingContextFixture
is used to mock-away this dependency in tests.
This is however hard to understand and adds
complexity to tests.

The patch uses RenderingContext directly in
most cases, or switches to mocks of the
RenderingContextInterface.

Strictly speaking, this makes some "unit" tests
de facto integration / functional tests, but
moving tests around or refactoring to mock
RenderingContext again is a task for further
patches.

For now, this patch should make various tests
easier to understand and follow.

Lots of test subjects carry the rendering
context around and access it to perform
things.

The "god" test fixture RenderingContextFixture
is used to mock-away this dependency in tests.
This is however hard to understand and adds
complexity to tests.

The patch uses RenderingContext directly in
most cases, or switches to mocks of the
RenderingContextInterface.

Strictly speaking, this makes some "unit" tests
de facto integration / functional tests, but
moving tests around or refactoring to mock
RenderingContext again is a task for further
patches.

For now, this patch should make various tests
easier to understand and follow.
@lolli42 lolli42 merged commit 24597b8 into main May 10, 2023
4 checks passed
@lolli42 lolli42 deleted the lolli-1 branch May 10, 2023 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant