Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Discovered via #2175459: Convert Drupal\system\Tests\InstallerTest into a new Drupal\simpletest\InstallerTestBase
InstallerTranslationTest
is supposed to fail with this patch, because it does not define any test* methods, and thus, the test is not actually executed.
Hopefully that's the only test.
#2201783: Simplify execution logic in TestBase::run() should be committed first.
Comment | File | Size | Author |
---|---|---|---|
#6 | drupal8.test-empty.6.patch | 1.4 KB | sun |
#5 | drupal8.test-empty.4.patch | 2.07 KB | sun |
drupal8.test-empty.0.patch | 1.43 KB | sun | |
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$caller
information.That's required here, because the automated detection of
$caller
explicitly 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++ :-)