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

PhpUnit: use database for tests, added tests #4138

Merged
merged 95 commits into from
Sep 17, 2024

Conversation

sreichel
Copy link
Contributor

@sreichel sreichel commented Aug 2, 2024

Description

  • install Openmage database for tests

GitHub workflow updates

  • merged phpunit and sonar, to not run tests twice
  • added unit-tests to php-cs-fixer/phpcs/phpstan checks

UnitTests

  • added tests from testfield
  • updated existing unit-tests
  • moved unit-tests to root directory
  • added composer scripts
  • added ~150 tests

Tests

composer run phpunit:test

or with covarge:

composer run phpunit:coverage

and with local html covarge: (view build/coverage/index.html)

composer run phpunit:coverage-local

@sreichel sreichel marked this pull request as draft August 2, 2024 22:35
- some tests commented - need files changes
@sreichel sreichel changed the title PhpUnit: added & update some tests PhpUnit: use database for tests, added tests Sep 4, 2024
addison74
addison74 previously approved these changes Sep 6, 2024
colinmollenhour
colinmollenhour previously approved these changes Sep 9, 2024
Copy link
Member

@colinmollenhour colinmollenhour left a comment

Choose a reason for hiding this comment

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

Very nice!

addison74
addison74 previously approved these changes Sep 9, 2024
@sreichel sreichel removed the request for review from mattdavenport September 9, 2024 22:57
@sreichel sreichel merged commit 953920a into OpenMage:main Sep 17, 2024
20 checks passed
@sreichel sreichel deleted the unit-tests branch September 17, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants