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 ability to combine onlyMethods and addMethod #3907

Conversation

bikalbasnet
Copy link
Contributor

@bikalbasnet bikalbasnet commented Oct 24, 2019

Related Issue: #3858
Reverts some codes that was added in this #3687

This PR gives the ability to combine two new methods together - onlyMethods and addMethods
so we can write UTs like this

$this->getMockBuilder(SomeClass::class)
    ->onlyMethods(['aMethodThatExists'])
    ->addMethods(['aMethodThatDoesNotExist']);

@bikalbasnet bikalbasnet force-pushed the combine-only-methods-and-add-methods branch from 3997a48 to b28e5d9 Compare October 28, 2019 07:16
@codecov
Copy link

codecov bot commented Oct 28, 2019

Codecov Report

Merging #3907 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3907      +/-   ##
============================================
+ Coverage     83.67%   83.68%   +0.01%     
+ Complexity     3855     3854       -1     
============================================
  Files           151      151              
  Lines         10201    10196       -5     
============================================
- Hits           8536     8533       -3     
+ Misses         1665     1663       -2
Impacted Files Coverage Δ Complexity Δ
src/Framework/MockObject/MockBuilder.php 61.11% <100%> (-2.76%) 36 <3> (ø)
src/Framework/MockObject/Generator.php 83.93% <100%> (ø) 145 <10> (ø) ⬇️
src/Util/Printer.php 50% <0%> (ø) 20% <0%> (ø) ⬇️
src/Framework/TestCase.php 81% <0%> (+0.17%) 336% <0%> (-2%) ⬇️
src/Util/Filter.php 97.87% <0%> (+2.75%) 22% <0%> (+1%) ⬆️

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 89ec093...adc1a00. Read the comment docs.

@sebastianbergmann
Copy link
Owner

Superseded by #3911.

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.

None yet

2 participants