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

Add setup for integration tests and other test-related fixes #105

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

briwa
Copy link
Contributor

@briwa briwa commented Apr 12, 2023

  • Adds integration test setup with php-vcr
  • Updates composer.json with php-discovery allow-plugins option
  • Fixes some issues with make test coverage
Before (main branch) Screenshot 2023-04-12 at 6 46 47 PM
After Screenshot 2023-04-12 at 6 45 48 PM

@briwa briwa self-assigned this Apr 12, 2023
@codeclimate
Copy link

codeclimate bot commented Apr 12, 2023

Code Climate has analyzed commit 438cc5c and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 77.1%.

View more on Code Climate.

@briwa briwa marked this pull request as ready for review April 12, 2023 09:38
@briwa briwa requested review from sbrych and pkopac April 12, 2023 09:39
@@ -11,7 +11,7 @@ composer:
dependencies:
make -s composer update -- --prefer-dist
test:
$(RUNNER) "phpunit --coverage-text --coverage-html ./coverage"
$(RUNNER) "XDEBUG_MODE=coverage phpunit --coverage-text --coverage-html ./coverage"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixes an issue where the env variable is missing, so the coverage isn't being printed out when running make test

Error: missing env Screenshot 2023-04-12 at 2 02 35 PM

Comment on lines +42 to +45
"config": {
"allow-plugins": {
"php-http/discovery": false
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixes a prompt that kept showing up when doing make composer install:

Prompt to remove Screenshot 2023-04-12 at 4 25 13 PM

Setting it to false so that it won't install any other plugins suggested and we can stick to the composer dependencies

Comment on lines -3 to +7
<coverage>
<include>
<filter>
<whitelist>
<directory suffix=".php">./src</directory>
</include>
</coverage>
</whitelist>
</filter>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Similarly this is to fix the error for coverage

Error: coverage: element is not expected Screenshot 2023-04-12 at 2 02 35 PM

@briwa briwa changed the title Add setup for integration tests and other fixes Add setup for integration tests and other test-related fixes Apr 12, 2023
@briwa briwa merged commit 55c2d0d into main Apr 14, 2023
@briwa briwa deleted the briwa/add-integration-tests-setup branch April 14, 2023 09:08
@briwa briwa mentioned this pull request Apr 18, 2023
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