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

[tests-only] code review of acceptance tests #8982

Merged
merged 1 commit into from Apr 29, 2024

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Apr 26, 2024

Description

Tidy up some things in the acceptance test code, such as:

  • declare variables where the IDE thinks that they may not be set
  • remove unused private vars in classes
  • update PHPdoc of functions to match reality
  • declare all parameter and return types
  • fixup some Behat step functions that did not use some parameter(s). Mostly add ?: in the step regex so that the not-needed item is not passed through as a parameter.
  • use print_r() in cases where we are generating a test-failure message including something that might be an array.
  • do not provide default values for private vars that already have their type declared (current PHP already provides those default values without needing to specify them)
  • delete functions that are not used (I have only deleting the ones that are "obviously" not used any more, another pass through the code can be done some time to remove more dead code)
  • make sure that all functions will always return what they are declared to return
  • fix small typos and grammar

Related Issue

How Has This Been Tested?

CI

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@phil-davis phil-davis self-assigned this Apr 26, 2024
@owncloud owncloud deleted a comment from update-docs bot Apr 26, 2024
@phil-davis phil-davis changed the title tests: code review of acceptance tests [tests-only] code review of acceptance tests Apr 26, 2024
@phil-davis phil-davis marked this pull request as ready for review April 29, 2024 08:11
Copy link
Member

@saw-jan saw-jan left a comment

Choose a reason for hiding this comment

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

LGTM. some SharingNG tests were failing, restarted the CI

Copy link

sonarcloud bot commented Apr 29, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@phil-davis phil-davis merged commit 6aff095 into master Apr 29, 2024
2 checks passed
@delete-merged-branch delete-merged-branch bot deleted the acceptance-test-code-review branch April 29, 2024 08:54
ownclouders pushed a commit that referenced this pull request Apr 29, 2024
[tests-only] code review of acceptance tests
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

3 participants