Pin the functional tests to Stark and stop installing the deprecated Olivero theme

Closes #3624244. Fixes two independent failures on the phpunit (next major) lane.

DomainTokenTest. DomainTestBase sets $profile = 'standard' and declares no $defaultTheme, and core documents that property as defaulting to the install profile's default theme. So every functional test extending it renders in whatever theme Standard installs, while a number of them assert rendered markup. Core has moved that theme from Olivero to Claro (12.0.0-alpha1) to Default Admin (current main). Default Admin overrides table.html.twig and builds each header cell's class as 'th__' ~ cell.content|render|clean_class, so responseContains('<th>Token</th>') can no longer match: the cell renders as <th class="th__token">Token</th>.

Fixed by declaring $defaultTheme = 'stark' on the base. Stark overrides no templates, so the markup these tests read is core's own on every supported version. Ten other test classes in the suite already set exactly this.

DomainCSSTest. It installed Olivero and made it the default theme, because its assertions required the domain CSS class to be the first class on the body element. Core 12 deprecates Olivero, so installing it raises a deprecation and the class exits non-zero even though every assertion passes.

Fixed by asserting the body classes through the DOM (elementExists('css', 'body.<class>')) instead of as raw markup. That removes the ordering requirement, which was the only reason a specific theme was needed, so the explicit install and the system.theme override both go away.

Verification. Neither failure is caused by an open merge request: both reproduce on 4.x at 3f34ac57, on a phpunit (next major) job played against pipeline 962178. On this branch, pipeline 966746 is green on every job, including phpunit (blocking, 11.4) and phpunit (next major), where DomainTokenTest and DomainCSSTest both report 1 passed.

Note that test-only changes carries no signal here: every file in this MR is a test file, so its "revert the non-test changes" step reverts nothing, and it runs on 11.4 where neither failure exists.

Edited by Frank Mably

Merge request reports

Loading
Loading