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

AssertContains - handle empty string in string. #2778

Conversation

SpacePossum
Copy link
Contributor

closes #2520

This PR make the following assert pass:

$this->assertContains('', 'test');

previous:

There was 1 error:

1) myTest::testA
mb_strpos(): Empty delimiter

/home/possum/work/phpunit/src/Framework/Constraint/StringContains.php:59

Copy link
Collaborator

@localheinz localheinz left a comment

Choose a reason for hiding this comment

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

👍

@codecov-io
Copy link

codecov-io commented Oct 4, 2017

Codecov Report

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

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2778      +/-   ##
============================================
+ Coverage     54.84%   54.85%   +0.01%     
- Complexity     2794     2795       +1     
============================================
  Files           104      104              
  Lines          7766     7768       +2     
============================================
+ Hits           4259     4261       +2     
  Misses         3507     3507
Impacted Files Coverage Δ Complexity Δ
src/Framework/Constraint/StringContains.php 100% <100%> (ø) 6 <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 f9396b6...bbf4aee. Read the comment docs.

@sebastianbergmann sebastianbergmann added the type/bug Something is broken label Oct 13, 2017
@sebastianbergmann
Copy link
Owner

Merged manually, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mb_strpos(): Empty delimiter
4 participants