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

assertNotContains incorrectly fails in some cases #1808

Closed
rrehbein opened this issue Jul 31, 2015 · 0 comments
Closed

assertNotContains incorrectly fails in some cases #1808

rrehbein opened this issue Jul 31, 2015 · 0 comments

Comments

@rrehbein
Copy link
Contributor

Code:

<?php
require 'vendor/autoload.php';
PHPUnit_Framework_Assert::assertNotContains(931640626, "2037827403");

Expected:

  • no error

Actual:

PHP Fatal error:  Uncaught Failed asserting that '2037827403' does not contain "931640626".

Only some combinations of numbers do it. I'm not sure what the pattern for failure is. The number source is rand().

Tested on:

  • PHP 5.4.41 / PHPUnit 4.7.7 / Debian Wheezy x86_64
  • PHP 5.4.31 / PHPUnit 4.5.1 / Ubuntu Trusty x86_64
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

No branches or pull requests

1 participant