Fix deprecated test code

Created on 25 September 2020, over 3 years ago
Updated 25 May 2023, about 1 year ago

Problem/Motivation

The tests contain code that will be deprecated in Drupal 9

  1x: Drupal\Tests\BrowserTestBase::$defaultTheme is required in drupal:9.0.0 when using an install profile that does not set a default theme. See https://www.drupal.org/node/3083055, which includes recommendations on which theme to use.
    1x in EmailNotifierTest::testEmailNotifier from Drupal\Tests\message_notify\Functional

  1x: Support for asserting against non-boolean values in ::assertTrue is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use a different assert method, for example, ::assertNotEmpty(). See https://www.drupal.org/node/3082086
    1x in MessageNotifyTest::testPostSendMessageSave from Drupal\Tests\message_notify\Kernel

  1x: Support for asserting against non-boolean values in ::assertFalse is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use a different assert method, for example, ::assertEmpty(). See https://www.drupal.org/node/3082086
    1x in MessageNotifyTest::testPostSendMessageSave from Drupal\Tests\message_notify\Kernel

Steps to reproduce

run phpunit on the module

πŸ“Œ Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rloos289

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    @rloos289,

    Thank you for your patch. I think it was a good patch when it was submitted. It looks like similar changes have been applied at some point.

      /**
       * {@inheritdoc}
       */
      protected $defaultTheme = 'stark';
    
Production build 0.69.0 2024