Skip to content

Tests refactoring#75

Merged
smeghead merged 10 commits into
smeghead:mainfrom
pmaasz:tests
Aug 28, 2024
Merged

Tests refactoring#75
smeghead merged 10 commits into
smeghead:mainfrom
pmaasz:tests

Conversation

@pmaasz
Copy link
Copy Markdown
Contributor

@pmaasz pmaasz commented Aug 28, 2024

  • adding tearDown functions to unset member variables in tests
  • reducing duplicate code fragments to also shorten test classes
  • adding dataprovider functions to shorten test classes
  • updating gitignore to ignore files/dirs created by phpstorm
  • renaming test functions for readability

Comment thread test/OptionsTest.php Outdated
}

public function testDiagram4(): void
private function provideDiagrams(): array
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

In PHP 8.0, references seem to fail if the dataProvider method is private.
I would like to see the dataProvider method changed to public.

https://www.reddit.com/r/PHP/comments/xupzk8/phpunit_data_provider_methods_can_have/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah I saw that :D thanks :D

@smeghead
Copy link
Copy Markdown
Owner

@pmaasz
Excellent work. Thank you very much!!

I would like to merge it as soon as the PHP8.0 test on GitHub Actions passes.

Copy link
Copy Markdown
Owner

@smeghead smeghead left a comment

Choose a reason for hiding this comment

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

Thank you!!

@smeghead smeghead merged commit bb7f53d into smeghead:main Aug 28, 2024
@pmaasz pmaasz deleted the tests branch August 28, 2024 15:28
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.

2 participants