Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298824

Refactor \Drupal\Tests\Core\Test\PhpUnitCliTest::testFunctionalTestDebugHtmlOutput

$
0
0

Problem/Motivation

In #3264764-8: PhpUnitCliTest::testFunctionalTestDebugHtmlOutput fails if BROWSERTEST_OUTPUT_DIRECTORY is an empty string @alexpott said:

Imo we should move testFunctionalTestDebugHtmlOutput to a functional test because it runs functional tests and so has even more requirements than just BROWSERTEST_OUTPUT_DIRECTORY - it'll fail with Exception: You must provide a SIMPLETEST_BASE_URL environment variable to run some PHPUnit based functional tests. too.

On top of that:

In \Drupal\Tests\Core\Test\PhpUnitCliTest::testFunctionalTestDebugHtmlOutput we run \Drupal\Tests\image\Functional\ImageDimensionsTest twice to test Functional test either creates debug HTML output or warns if it can't.

I don't think its a good pattern to use an actual Functional test to test our tests. For instance if the test moves or is somehow altered to not produce HTML output we have a problem.

\Drupal\Tests\image\Functional\ImageDimensionsTest makes 10 HTTP requests, so 10 HTML pages, where we basically only need one.

Steps to reproduce

Proposed resolution

- Turn \Drupal\Tests\Core\Test\PhpUnitCliTest::testFunctionalTestDebugHtmlOutput into a Functional test.

and

- Introduce a new Functional test with one HTTP request, so 1 HTML page and use this in \Drupal\Tests\Core\Test\PhpUnitCliTest::testFunctionalTestDebugHtmlOutput.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 298824

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>