Problem/Motivation

\Drupal\Tests\system\Functional\Common\UrlTest contains 7 test methods, and all but part of one of these are trivial to convert to a kernel test.

Steps to reproduce

Proposed resolution

Move the parts that can be converted trivially to a kernel test.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#5 3211480-5.patch19.27 KBlongwave
#2 3211480.patch18.98 KBlongwave

Comments

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
StatusFileSize
new18.98 KB

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

daffie’s picture

Status: Needs review » Needs work

A lot of testing is being removed in the patch. Do does test not be replaced with their kerneltest versions or can they just be removed?

There are a couple of unused use statements in the patch.

longwave’s picture

Status: Needs work » Needs review
StatusFileSize
new19.27 KB

Fixed the use statements.

--- a/core/modules/system/tests/src/Functional/Common/UrlTest.php
+++ b/core/modules/system/tests/src/Kernel/Common/UrlTest.php

Scanning the patch looks like a lot of lines have been removed, but what has actually happened is the entire functional test has been copied to the kernel test, and then parts of both old and new files have been removed. However, all assertions from the original test should exist in either the new test or remain in the original test.

daffie’s picture

Status: Needs review » Reviewed & tested by the community

@longwave: You are right, no testing will be lost.

All code changes look good to me.

  • catch committed 37cb5dd on 9.3.x
    Issue #3211480 by longwave, daffie: \Drupal\Tests\system\Functional\...

  • catch committed 33c3a20 on 9.2.x
    Issue #3211480 by longwave, daffie: \Drupal\Tests\system\Functional\...
catch’s picture

Version: 9.3.x-dev » 9.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.3.x and cherry-picked to 9.2.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.