Closed (outdated)
Project:
Drupal core
Version:
8.6.x-dev
Component:
entity system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Nov 2015 at 02:08 UTC
Updated:
4 Nov 2018 at 15:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dawehnerInteresting, this is the easiest bugfix I can think of. ... PHPUnit just doens't store the entire objects when they are equal.
Comment #3
berdirIs this the only broken test? I think I've seen others explode like this on things like assertNull($term) when they are failing. Those are web tests, so we can't just convert them to phpunit :)
Should we try to make our logging/verbose comparison output better?
Comment #4
blackra commentedBerdir, yes we should, but not for this issue. If you know of any other broken simpletest tests (especially web test cases), please open issues for them.
For this particular issue, the original base class is \Drupal\simpletest\KernelTestBase which has been deprecated in favour of one that works. The replacement doesn't give you the most friendly of output, but at least you know which test is failing and it doesn't kill the whole testsuite.
I have tested this, running it from the command line. I also tried adding a '.' to one of the serialized objects to cause this test to fail. It fails cleanly (although it gives a lengthy binary diff in the output).
An additional piece of information from Mixologi- is that the d.o bots use sqlite for running tests, and it has different constraints from running things through the UI with a MySQL database.
Anyway, I think this has had enough testing and reviewing for such a simple change. Marking this as RTBC.
Comment #5
blackra commentedActually marking it as RTBC this time :-)
Comment #6
catchThere's no change to the assertEqual here - so either the patch or the issue summary needs updating?
Comment #7
dawehnerLet me explain what is going on
Comment #9
catchFuture archeologists thank you.
But I just committed and reverted this again, because now we report fatal errors, the patch is failing.
Comment #11
mile23::future archaeologist raises hand::
Thanks.
I'm seeing this as a consequence of #2624926: Refactor run-tests.sh for Console component.
Running the patched test as
php ./core/scripts/run-tests.sh --class "Drupal\\KernelTests\\Core\\Entity\\EntityTypedDataDefinitionTest"yields a happy passing test. This is without sqlite.Running it in the UI leads to unhappiness in the form of "No test results to display."
Also, I can repro the original issue in the UI unpatched. I get this:
Comment #12
pflame commentedAdded message parameter to assertEqual which removed this error and test case passed.
Comment #23
amateescu commentedEntityTypedDataDefinitionTestruns just fine on MySQL these days :)