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

[plan] Remove simpletest dependencies from PHPUnit-based tests

$
0
0

Problem/Motivation

This issue enables #2807237: PHPUnit initiative

This issue comes from deciding scope for #2803621: Break BrowserTestBase & children dependency on Simpletest

If you search core/tests for \simpletest\, you discover that there are 10 files which depend on the simpletest module being installed (or at least autoloadable).

This is bad because we want to get rid of dependencies on simpletest so we can get rid of simpletest.

These fall into two categories:

1) Test traits which are used by PHPUnit-based tests (including KernelTestBase and BrowserTestBase), but are declared within the simpletest module.

The solution to this problem is confused by the fact that there are two non-simpletest locations for test traits: core/lib/Drupal/Core/Test and core/tests/Drupal/Tests. To further confuse matters, core/tests/Drupal/Tests has a Traits subdirectory, which seems to be in use for some traits, but not for others.

2) TestSuiteBase which uses Drupal\simpletest\TestDiscovery.

TestDiscovery could be moved to a different directory, but it is also a service used by core, and should perhaps not be available when the simpletest module is not installed.

Proposed resolution

Figure out where to move stuff.

Remaining tasks

Come up with rules about which directories are for traits.

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 294298

Trending Articles



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