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

Difference or bug in 1.4.2 makes phpunit fail. #44

Closed
ArturGoldyn opened this issue May 23, 2017 · 3 comments
Closed

Difference or bug in 1.4.2 makes phpunit fail. #44

ArturGoldyn opened this issue May 23, 2017 · 3 comments

Comments

@ArturGoldyn
Copy link

ArturGoldyn commented May 23, 2017

Hi,
I've been working on phpunit and found out there's a difference or bug.
sebastianbergmann/phpunit#2664
With package sebastian/diff 1.4.1 phpunit passes, and with package sebastian/diff 1.4.2 it fails.

Difference causes the first two failures. (remaining errors appear because I don't have TeamCity)

[arturdev@localhost phpunit]$ ./phpunit
PHPUnit 6.2-g298838d by Sebastian Bergmann and contributors.

Runtime: PHP 7.0.18 with Xdebug 2.5.1
Configuration: /home/arturdev/projects/phpunit/phpunit.xml

............................................................. 61 / 1541 ( 3%)
............................................................. 122 / 1541 ( 7%)
............................................................. 183 / 1541 ( 11%)
............................................................. 244 / 1541 ( 15%)
............................................................. 305 / 1541 ( 19%)
............................................................. 366 / 1541 ( 23%)
............................................................. 427 / 1541 ( 27%)
............................................................. 488 / 1541 ( 31%)
............................................................. 549 / 1541 ( 35%)
............................................................. 610 / 1541 ( 39%)
............................................................. 671 / 1541 ( 43%)
............................................................. 732 / 1541 ( 47%)
........................F........F........................... 793 / 1541 ( 51%)
............................................................. 854 / 1541 ( 55%)
............................................................. 915 / 1541 ( 59%)
............................................................. 976 / 1541 ( 63%)
............................................................. 1037 / 1541 ( 67%)
............................................................. 1098 / 1541 ( 71%)
............................................................. 1159 / 1541 ( 75%)
............................................................. 1220 / 1541 ( 79%)
............................................................. 1281 / 1541 ( 83%)
............................................................. 1342 / 1541 ( 87%)
............................................................. 1403 / 1541 ( 91%)
.S........................................................... 1464 / 1541 ( 95%)
.....................FF..........F........................... 1525 / 1541 ( 98%)
................ 1541 / 1541 (100%)

Time: 37.03 seconds, Memory: 14.00MB

There were 5 failures:

  1. PHPUnit\Framework\ConstraintTest::testConstraintIsEqual2 with data set Public API fixes #3 ('a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk', 'a\np\nc\nd\ne\nf\ng\nh\ni\nw\nk', 'Failed asserting that two str...n k'\n')
    Failed asserting that two strings are equal.

--- Expected
+++ Actual
@@ @@
'custom message\n
Failed asserting that two strings are equal.\n
+\n
@@ @@
+p\n\n
-\n
@@ @@\n
i\n\n
-j\n\n
+w\n\n
k'\n
'

/home/arturdev/projects/phpunit/src/Framework/Constraint/IsEqual.php:140
/home/arturdev/projects/phpunit/src/Framework/Assert.php:2116
/home/arturdev/projects/phpunit/src/Framework/Assert.php:541
/home/arturdev/projects/phpunit/tests/Framework/ConstraintTest.php:850
/home/arturdev/projects/phpunit/src/Framework/TestCase.php:1056
/home/arturdev/projects/phpunit/src/Framework/TestCase.php:915
/home/arturdev/projects/phpunit/src/Framework/TestResult.php:696
/home/arturdev/projects/phpunit/src/Framework/TestCase.php:870
/home/arturdev/projects/phpunit/src/Framework/TestSuite.php:746
/home/arturdev/projects/phpunit/src/Framework/TestSuite.php:746
/home/arturdev/projects/phpunit/src/Framework/TestSuite.php:746
/home/arturdev/projects/phpunit/src/Framework/TestSuite.php:746
/home/arturdev/projects/phpunit/src/TextUI/TestRunner.php:534
/home/arturdev/projects/phpunit/src/TextUI/Command.php:209
/home/arturdev/projects/phpunit/src/TextUI/Command.php:140

  1. PHPUnit\Framework\ConstraintTest::testConstraintIsEqual2 with data set Corrected the indentation in composer.json #12 (stdClass Object (...), stdClass Object (...), 'Failed asserting that two obj...\n )\n')
    Failed asserting that two strings are equal.

--- Expected
+++ Actual
@@ @@
'custom message\n
Failed asserting that two objects are equal.\n
+\n
+\n
@@ @@

  •        0 => 4\n
    

-\n
@@ @@\n
'foo' => 'a\n\n

  •    b\n\n
    
  •    p\n\n
    

-\n
@@ @@\n
i\n\n

  •    j\n\n
    
  •    w\n\n
       k'\n
    
    )\n
    'self' => stdClass Object (...)\n
    'c' => stdClass Object (...)\n
    )\n
    '

/home/arturdev/projects/phpunit/src/Framework/Constraint/IsEqual.php:140
/home/arturdev/projects/phpunit/src/Framework/Assert.php:2116
/home/arturdev/projects/phpunit/src/Framework/Assert.php:541
/home/arturdev/projects/phpunit/tests/Framework/ConstraintTest.php:850
/home/arturdev/projects/phpunit/src/Framework/TestCase.php:1056
/home/arturdev/projects/phpunit/src/Framework/TestCase.php:915
/home/arturdev/projects/phpunit/src/Framework/TestResult.php:696
/home/arturdev/projects/phpunit/src/Framework/TestCase.php:870
/home/arturdev/projects/phpunit/src/Framework/TestSuite.php:746
/home/arturdev/projects/phpunit/src/Framework/TestSuite.php:746
/home/arturdev/projects/phpunit/src/Framework/TestSuite.php:746
/home/arturdev/projects/phpunit/src/Framework/TestSuite.php:746
/home/arturdev/projects/phpunit/src/TextUI/TestRunner.php:534
/home/arturdev/projects/phpunit/src/TextUI/Command.php:209
/home/arturdev/projects/phpunit/src/TextUI/Command.php:140

[...]

@SpacePossum
Copy link
Contributor

Thanks for reporting.
This should be resolved with sebastianbergmann/phpunit#2687
Did you try updating both the packages?

@ArturGoldyn
Copy link
Author

Thank you for suggestion, after merging master into feature branch all tests passed successfully.

@SpacePossum
Copy link
Contributor

good to hear :)
thanks for reporting back!

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

2 participants