Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
simpletest.module
Priority:
Major
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
27 Feb 2014 at 09:51 UTC
Updated:
29 Jul 2014 at 23:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sundrupal8.test-empty.0.patch queued for re-testing.
Comment #5
sunNow including fix.
Comment #6
sun#2201783: Simplify execution logic in TestBase::run() has landed, so this is ready to go now.
Comment #7
tstoecklerIt looks good, but the if(TRUE) should be removed before commit.
Comment #8
sunThat no longer exists in the latest patch? ;)
Comment #9
tstoecklerSorry, don't know how that happened. Latest patch looks great. I have one minor comment, though:
A little further down we use TestBase::insertAssert() directly. On the other hand I would have expected $this->fail() instead. Thoughts?
Comment #10
tstoecklerAhh, OK we use TestBase::insertAssert() so we can get the assertion ID. That is not needed here, so we should really be using $this->fail() as far as I can tell.
That's super minor, though, so let's just get this in.
Comment #11
sunTo clarify,
TestBase::fail()does not allow to pass a custom$callerinformation.That's required here, because the automated detection of
$callerexplicitly skips all methods in test base classes, so without supplying a custom$caller, the failing assertion would exposesimpletest_batch_operation()as the originating code file/line.Comment #12
tstoecklerOohh, that's interesting. Thanks!
Would have been great to have a comment for that as I can easily see people wanting to "fix" that in the future. But anyway, still RTBC.
Comment #13
webchickNice optimization.
Committed/pushed to 8.x, with this comment added above the assert:
Hopefully that's mostly right. :)
Comment #14
tstoecklerAwesome, thanks! sun++, webchick++ :-)