Skip to content

Mocking an interface that extends another interface forgets to mock its own methods#3604

Merged
sebastianbergmann merged 1 commit intosebastianbergmann:7.5from
morozov:issues/3596
Apr 22, 2019
Merged

Mocking an interface that extends another interface forgets to mock its own methods#3604
sebastianbergmann merged 1 commit intosebastianbergmann:7.5from
morozov:issues/3596

Conversation

@morozov
Copy link
Copy Markdown
Contributor

@morozov morozov commented Apr 12, 2019

Fixes #3596.

@morozov morozov changed the title When mocking an interface that implements Throwable, do not forget to …mock its own methods When mocking an interface that implements Throwable, do not forget to mock its own methods Apr 12, 2019
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 12, 2019

Codecov Report

Merging #3604 into 7.5 will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                7.5    #3604      +/-   ##
============================================
+ Coverage     83.41%   83.43%   +0.01%     
- Complexity     3632     3636       +4     
============================================
  Files           143      143              
  Lines          9671     9682      +11     
============================================
+ Hits           8067     8078      +11     
  Misses         1604     1604
Impacted Files Coverage Δ Complexity Δ
src/Framework/MockObject/Generator.php 88.3% <100%> (+0.3%) 137 <3> (+4) ⬆️
src/Runner/Version.php 66.66% <0%> (ø) 8% <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 c29c052...db2e014. Read the comment docs.

@sebastianbergmann sebastianbergmann merged commit 521aef9 into sebastianbergmann:7.5 Apr 22, 2019
@sebastianbergmann
Copy link
Copy Markdown
Owner

Thanks!

@sebastianbergmann sebastianbergmann changed the title When mocking an interface that implements Throwable, do not forget to mock its own methods Mocking an interface that extends another interface forgets to mock its own methods Apr 22, 2019
@morozov morozov deleted the issues/3596 branch April 22, 2019 16:40
morozov added a commit to morozov/dbal that referenced this pull request May 16, 2019
1. Got rid of hard-coded exception mocks in favor of PHPUnit-generated ones.
2. Reworked AbstractDriverTest::testConvertsException() to use a data provider to make testing all types of exceptions independent.
3. Updated PHPUnit since the reworked code relies on sebastianbergmann/phpunit#3604 and sebastianbergmann/phpunit#3694.
morozov added a commit to morozov/dbal that referenced this pull request May 16, 2019
1. Got rid of hard-coded exception mocks in favor of PHPUnit-generated ones.
2. Reworked AbstractDriverTest::testConvertsException() to use a data provider to make testing all types of exceptions independent.
3. Updated PHPUnit since the reworked code relies on sebastianbergmann/phpunit#3604 and sebastianbergmann/phpunit#3694.
morozov added a commit to morozov/dbal that referenced this pull request May 16, 2019
1. Got rid of hard-coded exception mocks in favor of PHPUnit-generated ones where possible.
2. Reworked AbstractDriverTest::testConvertsException() to use a data provider to make testing all types of exceptions independent.
3. Updated PHPUnit since the reworked code relies on sebastianbergmann/phpunit#3604.
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.

2 participants