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

100% test coverage #48

Merged
merged 3 commits into from
May 29, 2023
Merged

100% test coverage #48

merged 3 commits into from
May 29, 2023

Conversation

osteel
Copy link
Owner

@osteel osteel commented May 29, 2023

Summary

This PR brings test coverage to 100% of the code base.

Explanation

I previously removed the test coverage constraint because 1) I was in a rush and 2) the report seemed to ignore the domain folder.

I've since then identified that the reason for the latter was I was using PCOV, which doesn't read phpunit.xml properly. Switching to Xdebug for coverage fixes the issue.

Checklist

  • I have provided a summary and an explanation
  • I have reviewed the PR myself and left comments to provide context
  • I have covered the changes with tests as appropriate
  • I have made sure static analysis and other checks are successful

Comment on lines -14 to -17
public function all(TaxYearId $taxYearId): Generator
{
return $this->retrieveAll($taxYearId);
}
Copy link
Owner Author

Choose a reason for hiding this comment

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

ℹ️ Dead code

@@ -42,7 +42,7 @@ protected static function newFactory(): SharePoolingAssetAcquisitionFactory
return SharePoolingAssetAcquisitionFactory::new();
}

public function averageCostBasisPerUnit(): ?FiatAmount
public function averageCostBasisPerUnit(): FiatAmount
Copy link
Owner Author

Choose a reason for hiding this comment

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

ℹ️ Can't actually be null (wondering why PHPStan didn't pick this up)

Comment on lines +27 to 32
/**
* @return Traversable<int, SharePoolingAssetTransaction>
*
* @codeCoverageIgnore
*/
public function getIterator(): Traversable
Copy link
Owner Author

Choose a reason for hiding this comment

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

ℹ️ Needs to be implemented because of the IteratorAggregate interface, but I don't actually use it anywhere

@osteel osteel force-pushed the debt/test-coverage branch from bb75560 to e17e53f Compare May 29, 2023 15:44
@osteel osteel force-pushed the debt/test-coverage branch from e17e53f to 324d0e1 Compare May 29, 2023 15:49
Copy link
Owner Author

Choose a reason for hiding this comment

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

ℹ️ Dead code

Copy link
Owner Author

Choose a reason for hiding this comment

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

ℹ️ Dead code

@osteel osteel marked this pull request as ready for review May 29, 2023 15:51
@osteel osteel merged commit a9b2c2a into main May 29, 2023
@osteel osteel deleted the debt/test-coverage branch May 29, 2023 15:53
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.

1 participant