Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Follow up to #2863262-53: Bootstrap: Convert system functional tests to phpunit
UncaughtExceptionTest should be cleaned up and not be made to use cUrl. Some attempts were made to do this in #2863262: Bootstrap: Convert system functional tests to phpunit but DrupalCi has issues displaying errors. It seems, when using Guzzle (or drupalGet) it will always show a white page.
We should find out why this is and maybe use that to clean up the whole call stack when dealing with exceptions in tests.
Comment | File | Size | Author |
---|---|---|---|
#17 | 2987980-17.patch | 10.26 KB | alexpott |
#12 | interdiff.2987980.9-12.txt | 1.28 KB | longwave |
#12 | 2987980-12.patch | 10.1 KB | longwave |
Comments
Comment #2
jibranComment #3
Lendude@jibran thanks for opening this! Updated the IS to include some of the work done on this.
Something like #48 #2863262-48: Bootstrap: Convert system functional tests to phpunit would be nice I think, if we can get it to work on CI.
Comment #8
alexpottAh yes this will make debugging this test and to use it for better testing.
Comment #9
alexpottCompleting the sentence...
Comment #11
LendudeNice! So that was the trick I kept missing :)
While we are cleaning this up, should we remove the
in
\Drupal\FunctionalTests\Bootstrap\UncaughtExceptionTest::testUncaughtException
too? That doesn't do anything since we then set this config in settings.php which will always take precedence. So leaving this in creates a sense of testing something we aren't actually testing.Comment #12
longwaveAgree with #11, let's remove those lines as they do nothing.
Comment #13
alexpott@Lendude @longwave I was thinking to leave these there - they ensure the test runner env and the site under test have the same config. writeSettings - doesn't flush the config cache. But no biggie. I guess for me it's just not part of the scope here.
Comment #14
LendudeYeah, not sure we needed to remove that, that's why I asked, but this feels like a clean up and leaving the code in makes it look like it's needed when it's not (in this case...). Leaving it in sorta gives a false sense of security that we are testing that setting when it's in config when we are actually not testing it at all. So all in all ¯\_(ツ)_/¯
But this looks ready to me, very nice!
Comment #15
andypost++ now only 2 tests remains infected by curl
Comment #16
catchLooks good but needs a re-roll.
Comment #17
alexpottRerolled...
Comment #20
catchCommitted/pushed to 9.2.x and 9.1.x, thanks!
Comment #21
andypostComment #22
xjm