Scheduler testing at core 8.6 and 8.7 in Travis is failing with:

11x SafeMarkup::checkPlain() is scheduled for removal in Drupal 9.0.0. Rely on Twig's auto-escaping feature, or use the @link theme_render #plain_text @endlink key when constructing a render array that contains plain text in order to use the renderer's auto-escaping feature. If neither of these are possible, \Drupal\Component\Utility\Html::escape() can be used in places where explicit escaping is needed. See https://www.drupal.org/node/2549395.

4x in SchedulerRequiredTest::testRequiredScheduling from Drupal\Tests\scheduler\Functional
3x in SchedulerValidationTest::testValidationDuringEdit from Drupal\Tests\scheduler\Functional
2x in SchedulerPermissionsTest::testUserPermissions from Drupal\Tests\scheduler\Functional
2x in SchedulerPastDatesTest::testSchedulerPastDates from Drupal\Tests\scheduler\Functional

Tests on Travis: https://travis-ci.org/jonathan1055/scheduler/branches
Change record: https://www.drupal.org/node/2549395

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonathan1055 created an issue. See original summary.

Satyanarayan Reddy’s picture

Replace SafeMarkup::checkPlain()

Satyanarayan Reddy’s picture

Status: Active » Needs review
FileSize
8.45 KB

Replace SafeMarkup

Status: Needs review » Needs work

The last submitted patch, 3: Replace-SafeMarkup-3034986-3.patch, failed testing. View results

Satyanarayan Reddy’s picture

Status: Needs work » Needs review
FileSize
8.45 KB

Replace deprecated function

thalles’s picture

Applied with success!

thalles’s picture

Thanks @Satyanarayan Reddy

thalles’s picture

Status: Needs review » Reviewed & tested by the community

The last submitted patch, 2: Replace-SafeMarkup-3034986-2.patch, failed testing. View results

thalles’s picture

Applied with success! #5

jonathan1055’s picture

jonathan1055’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
8.33 KB

Looking at these tests more closely, only two of them (pastdates and permissoin) actually need to escape the title text. The requiredScheduling test uses node title values created from hard-coded test data. The Validation test has titles generated via $this->drupalCreateNode which only contain letters and digits not anything which needs escaping. So let's not do unnecessary work in the tests.

  • jonathan1055 committed e8fc710 on 8.x-1.x
    Issue #3034986 by Satyanarayan Reddy, jonathan1055: Replace deprecated...
jonathan1055’s picture

Status: Needs review » Fixed

Thanks @Satyanarayan Reddy for the original patch. Fixed and committed.

Now that we have removed all deprecation notices when running core 8.6 the Travis tests now pass at 8.6 as well as 8.5
https://travis-ci.org/jonathan1055/scheduler/branches

Status: Fixed » Closed (fixed)

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