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.
Problem/Motivation
./vendor/phpunit/phpunit/phpunit -c ./core **/OgMembershipReferenceItemTest.php
PHPUnit 4.8.11 by Sebastian Bergmann and contributors.
S
Time: 343 ms, Memory: 6.00Mb
OK, but incomplete, skipped, or risky tests!
Tests: 1, Assertions: 0, Skipped: 1.
After some digging I found $this->markTestSkipped('There is no database connection so no tests can be run. You must provide a SIMPLETEST_DB environment variable to run PHPUnit based functional tests outside of run-tests.sh. See https://www.drupal.org/node/2116263#skipped-tests for more information.');
in core/tests/Drupal/KernelTests/KernelTestBase.php
but this is not displayed.
Proposed resolution
No idea but the current message makes kernel tests impossible to run. phpunit sucks enough we do not need more frustration.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#8 | 2635324-8.patch | 1.66 KB | dawehner |
#2 | 2635324-2.patch | 554 bytes | dawehner |
Comments
Comment #2
dawehnerAll you need to make it visible is
-v
Maybe we could put that into our phpunit.xml.dist file by default.
Comment #3
chx CreditAttribution: chx commentedWell, that works. I can't comment on whether this makes things _too_ verbose in general but certainly it works.
Comment #4
alexpottI'm not sure this is the right solution - it seems strange to turn on verbose for all tests just to show this message.
Comment #5
dawehnerWell, the alternative might be to throw an exception?
Comment #6
alexpottOr just fail no?
Comment #7
chx CreditAttribution: chx commentedThrowing an exception allows to show a message... which is what we need here. Badly.
Comment #8
dawehnerComment #9
chx CreditAttribution: chx at Smartsheet commentedEven better!
Comment #10
alexpottCommitted 1b7a50d and pushed to 8.0.x and 8.1.x. Thanks!
Comment #14
neclimdulThis was a regression. This was previously fixed and is expected functionality. --verbose provides information on why tests are skipped.
Comment #15
alexpott@neclimdul well it is tricky - perhaps we need to set the verbose level in phpunit.xml.dist... because it is completely no obvious as to why the tests are skipped.
Comment #16
alexpottAlso can we have a new issue rather than re-opening issues - re-opening issues messes up stats, issue credits etc.
Comment #17
neclimdulok, follow up opened. #2714555: Regression in SIMPLETEST environment skipping