wearerequired / traduttore

🗼 A WordPress plugin to improve the I18N workflow for your own projects based on @GlotPress.
https://wearerequired.github.io/traduttore/
72 stars 12 forks source link

Test coverage improvements #118

Closed swissspidy closed 5 years ago

swissspidy commented 5 years ago

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:

codecov-io commented 5 years ago

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) :arrow_down:
inc/Repository/Bitbucket.php 96.77% <100%> (-0.85%) 19 <0> (-5)
inc/Repository/GitHub.php 100% <100%> (ø) 5 <0> (-5) :arrow_down:
inc/Repository/Base.php 87.5% <100%> (+16.53%) 25 <5> (+3) :arrow_up:
inc/Project.php 100% <100%> (+3.44%) 44 <1> (ø) :arrow_down:
inc/Plugin.php 29.6% <100%> (+4.8%) 39 <0> (ø) :arrow_down:
inc/Repository/GitLab.php 100% <100%> (+4%) 6 <0> (-5) :arrow_down:
inc/WebhookHandler/Bitbucket.php 97.29% <0%> (+5.4%) 12% <0%> (ø) :arrow_down:
... 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.