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

Improve code coverage and fix bug #55

Merged
merged 7 commits into from
Jun 4, 2018
Merged

Improve code coverage and fix bug #55

merged 7 commits into from
Jun 4, 2018

Conversation

mmachatschek
Copy link
Contributor

This will increase code coverage to 100%.
There is also a fix implemented which led to not existing keywords and ordernumbers if added via the setAllxyz method.

@mmachatschek mmachatschek requested a review from howard June 1, 2018 21:21
@mmachatschek mmachatschek self-assigned this Jun 1, 2018
@codecov-io
Copy link

codecov-io commented Jun 1, 2018

Codecov Report

Merging #55 into develop will increase coverage by 0.84%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop      #55      +/-   ##
=============================================
+ Coverage      98.98%   99.83%   +0.84%     
- Complexity       220      221       +1     
=============================================
  Files             30       30              
  Lines            592      593       +1     
=============================================
+ Hits             586      592       +6     
+ Misses             6        1       -5
Impacted Files Coverage Δ Complexity Δ
...OLOGIC/Export/Helpers/UsergroupAwareMultiValue.php 100% <100%> (ø) 9 <0> (+1) ⬆️
...LOGIC/Export/Helpers/UsergroupAwareSimpleValue.php 100% <100%> (+3.84%) 10 <0> (ø) ⬇️
...IC/Export/Helpers/UsergroupAwareMultiValueItem.php 100% <100%> (+23.07%) 5 <0> (ø) ⬇️
src/FINDOLOGIC/Export/Data/Image.php 100% <100%> (ø) 10 <0> (ø) ⬇️
src/FINDOLOGIC/Export/XML/XMLItem.php 100% <0%> (+1.19%) 27% <0%> (ø) ⬇️

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 78db71d...b1f7682. Read the comment docs.

@mmachatschek mmachatschek changed the title Improve codeverage and fix bug Improve code coverage and fix bug Jun 4, 2018
Copy link
Collaborator

@howard howard left a comment

Choose a reason for hiding this comment

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

One small commend, and conflicts to resolve - then we're good to go for the next release!

$this->values = [];

/* @var UsergroupAwareMultiValueItem $value */
foreach ($values as $value) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Adding in a loop is super inefficient when we could just assign the input array. To achieve 100% coverage, I'd rather have a test that just gets the value.

Copy link
Collaborator

@howard howard Jun 4, 2018

Choose a reason for hiding this comment

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

Forget what I said. I now realize that this fixes a bug.

@howard howard merged commit a02a1a3 into develop Jun 4, 2018
@howard howard deleted the improve_code_tests branch June 4, 2018 16:09
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.

3 participants