Problem/Motivation

\Drupal\Tests\Core\Test\PhpUnitCliTest executes a functional test, so requires a webserver and database.
So it is not a unit test

Steps to reproduce

See https://git.drupalcode.org/project/gitlab_ci_testbed_for_drupal_core/-/j... from when we were setting up gitlab ci.
This commit https://git.drupalcode.org/project/gitlab_ci_testbed_for_drupal_core/-/c... was required to get unit tests to pass, IE we needed a DB and webserver

Proposed resolution

Move the test
Revert the 'with webserver' requirement for unit tests

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

larowlan created an issue. See original summary.

mondrake’s picture

There are two tests in that class; I think testPhpUnitListTests should remain a Unit test, because it is meant to identify if there are class duplications by running PHPUnit's test discovery. That serves the purpose of ensuring if you run a test group in PHPUnit CLI and not through run-tests.sh, you do not incure in fatal errors.

testFunctionalTestDebugHtmlOutput on the other hand yes, it could be split into a FunctionalTest.

mondrake’s picture

This is outdated now, testFunctionalTestDebugHtmlOutput was moved in another issue.

However, there are other tests currently requiring a db, and the 'with webserver' requirement for unit tests cannot be reverted.

Not closing the issue as it’s referenced in pipeline.yml; however a new issue is needed.

mondrake’s picture

Status: Active » Closed (outdated)

This was fixed in the related issue.