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

Test coverage improvements #118

Merged
merged 10 commits into from
Nov 15, 2018
Merged

Test coverage improvements #118

merged 10 commits into from
Nov 15, 2018

Conversation

swissspidy
Copy link
Collaborator

Description

This PR makes some of the test code more DRY by adding a new TestCase class. In the future this class can be extended to add helper factories to create projects or create some entities by default.

Also improves test coverage for some parts of the plugin.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code has proper inline documentation.

@swissspidy swissspidy added the [Component] Tests Focus on automated testing label Nov 14, 2018
@codecov-io
Copy link

codecov-io commented Nov 14, 2018

Codecov Report

Merging #118 into master will increase coverage by 1.25%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #118      +/-   ##
============================================
+ Coverage     76.41%   77.66%   +1.25%     
+ Complexity      341      328      -13     
============================================
  Files            23       23              
  Lines           814      788      -26     
============================================
- Hits            622      612      -10     
+ Misses          192      176      -16
Impacted Files Coverage Δ Complexity Δ
inc/WebhookHandler/GitLab.php 100% <ø> (+3.03%) 10 <0> (-1) ⬇️
inc/Repository/Bitbucket.php 96.77% <100%> (-0.85%) 19 <0> (-5)
inc/Repository/GitHub.php 100% <100%> (ø) 5 <0> (-5) ⬇️
inc/Repository/Base.php 87.5% <100%> (+16.53%) 25 <5> (+3) ⬆️
inc/Project.php 100% <100%> (+3.44%) 44 <1> (ø) ⬇️
inc/Plugin.php 29.6% <100%> (+4.8%) 39 <0> (ø) ⬇️
inc/Repository/GitLab.php 100% <100%> (+4%) 6 <0> (-5) ⬇️
inc/WebhookHandler/Bitbucket.php 97.29% <0%> (+5.4%) 12% <0%> (ø) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4db837c...ffe1425. Read the comment docs.

@swissspidy swissspidy added this to the 3.0.0 milestone Nov 14, 2018
@swissspidy swissspidy merged commit af70e10 into master Nov 15, 2018
@delete-merged-branch delete-merged-branch bot deleted the some-tests branch November 15, 2018 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Tests Focus on automated testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants