Deprecated d9 testing code

Created on 25 September 2020, almost 4 years ago
Updated 11 January 2024, 6 months ago

Problem/Motivation

All tests pass in D8 but they give the following deprecation notices

  8x: 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 MenuTest::testMenuLinks from Drupal\Tests\message\Functional
    1x in MessageCreateTest::testMessageCreateDefaultValues from Drupal\Tests\message\Functional
    1x in MessageTemplateCrudTest::testCrudEntityType from Drupal\Tests\message\Functional
    1x in MessageTemplateListTest::testEntityTypeList from Drupal\Tests\message\Functional
    1x in MessageTemplateSuggestionsTest::testMessageThemeHookSuggestions from Drupal\Tests\message\Functional
    1x in MessageTemplateUiTest::testMessageTemplateTranslate from Drupal\Tests\message\Functional
    1x in MessageTextHandlerTest::testTextHandler from Drupal\Tests\message\Functional
    1x in MessageTextHandlerTest::testHtmlTextHandler from Drupal\Tests\message\Functional

  3x: 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 MessageTemplateCrudTest::testCrudEntityType from Drupal\Tests\message\Functional
    1x in MessageTemplateUiTest::testMessageTemplateTranslate from Drupal\Tests\message\Functional
    1x in MessageCheckAndDeleteWorkerTest::testProcessItem from Drupal\Tests\message\Kernel\Plugin\QueueWorker

  2x: 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 MessageThemeTest::testMessageTextWrapper from Drupal\Tests\message\Kernel
    1x in MessageCheckAndDeleteWorkerTest::testProcessItem from Drupal\Tests\message\Kernel\Plugin\QueueWorker

  1x: EntityManagerInterface::getDefinitions() is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Entity\EntityTypeManager::getDefinitions() instead. See https://www.drupal.org/node/2549139
    1x in MenuTest::testMenuLinks from Drupal\Tests\message\Functional

  1x: EntityManagerInterface::getStorage() is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Entity\EntityTypeManager::getStorage() instead. See https://www.drupal.org/node/2549139
    1x in MessageTextHandlerTest::testHtmlTextHandler from Drupal\Tests\message\Functional
πŸ“Œ Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rloos289

Live updates comments and jobs are added and updated live.
  • testing

    Used for Documentation issues related to testing and test development

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

    MenuTest has $defaultTheme = 'claro';, so does MessageTestBase.
    MessageCheckAndDeleteWorkerTest and MessageThemeTest are updated like in the patch.

Production build 0.69.0 2024