Problem/Motivation
Now that we have JavaScript test base in core, themes might be interested in providing tests. This is the case for the new Drupal Core theme Claro for example which is worked on in a contrib project.
Proposed resolution
Add themes to the phpunit whitelist and make any other changes necessary to allow themes to provide tests.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3029167-6.patch | 3.1 KB | lendude |
| #2 | 3029167-1.patch | 508 bytes | lauriii |
Comments
Comment #2
lauriiiComment #3
lendudeMakes sense to me.
This needs tests. Something added to
\Drupal\Tests\simpletest\Unit\TestDiscoveryTest?Comment #4
dawehnerThat would be nice indeed. It feels like some actual implementation of such a test inside a theme would be dramatically helpful as well.
Otherwise, who knows whether this actually works.
Comment #5
lendudeYeah but if it is never discovered, it is never run, and it never fails, so that would give little guarantee by itself. But yeah, it would be a nice addition along with the TestDiscoveryTest test.
Comment #6
lauriiiI looked at
\Drupal\Tests\simpletest\Unit\TestDiscoveryTestbut it seemed specific to Simpletest. I'm wondering if we have to add support for Simpletest as well or if it would be enough that the tests can be discovered using PHPUnit.Comment #7
lendude@lauriii I already wrote something for \Drupal\Tests\simpletest\Unit\TestDiscoveryTest, but it passes without the fix too, so its not really testing that. So was looking for a way to test the actual fix, but got distracted :)
Here is what I had so far.
Comment #19
dcam commentedThe
phpunit.xml.distchanges that permitted scanning themes were added in #3417066: Upgrade PHPUnit to 10, drop Symfony PHPUnit-bridge dependency.