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

Make Linter happy about tests #1332

Merged
merged 6 commits into from
May 15, 2022
Merged

Make Linter happy about tests #1332

merged 6 commits into from
May 15, 2022

Conversation

nagmat84
Copy link
Collaborator

This is a really trivial and annoying PR, because it changes nothing on the functional level.

For my up-comping PR on use_filestreams after #1309 has been merged, I promised 85% test coverage for the stuff in /app/Image/ and /app/Actions/Photo/. So I am busy adding tests to use_filestreams.

However, I want to get some "trivial" stuff in /tests out of the way so that the eventual PR is not littered.

This PR changes three aspects:

  • Make the Linter happy; adding return types everywhere, etc. pp.

  • Added helper methods in TestCase to create UploadedFiles objects. I will need that a lot in the upcoming PR and I don't want to repeat boiler-plate code. This has also reduced some existing boiler plate code already.

  • Re-organized the files around photo tests. Now there are three instead of two:

    • PhotosAddTests: contains tests from the previous PhotosTests
    • PhotosOperationTests: contains tests from the previous PhotosTests
    • PhotosRotateTest: same as before

    The reason why I split the former PhotosTest is again the upcoming PR. There will be a lot of new tests in PhotosAddTests for the various combinations we support. So I don't wanted to get the old PhotosTests too crowded. It is also called PhotosAddTests (instead of PhotosUploadTests) on purpose: a) we also have imports; b) this way it comes before PhotoOperations in the alphabetical order and we should test photo uploads first before we operate on them.

@nagmat84 nagmat84 requested review from ildyria and qwerty287 May 15, 2022 18:35
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@ildyria ildyria left a comment

Choose a reason for hiding this comment

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

LGTM

@nagmat84 nagmat84 merged commit aacdcb9 into master May 15, 2022
@nagmat84 nagmat84 deleted the make_linter_for_tests_happy branch May 15, 2022 22:10
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.

3 participants