[Meta] Test Refactor

Created on 9 March 2019, over 5 years ago
Updated 19 October 2024, about 1 month ago

Our tests are getting long in the tooth.

Here is a list of maintenance issue associated with tests

deprecated:

UserCreationTrait ( in 8.4 )
JavascriptTestBase ( 8.5 )
ContentTypeCreationTrait ( 8.4 )
NodeCreationTrait ( 8.4 )

I am going to work on this .. I just want a meta issue to track items outstanding.

 ./vendor/bin/phpunit -c web/core/ --group=flag
  17x: Drupal\simpletest\UserCreationTrait is deprecated in Drupal 8.4.x. Will be removed before Drupal 9.0.0. Use Drupal\Tests\user\Traits\UserCreationTrait instead. See https://www.drupal.org/node/2884454.
    1x in FlagServiceTest::testFlagServiceFlagExceptions from Drupal\Tests\flag\Kernel
    1x in FlagCountsTest::testEntityDeletion from Drupal\Tests\flag\Kernel
    1x in FlagCountsTest::testFlagDeletion from Drupal\Tests\flag\Kernel
    1x in FlagCountsTest::testAnonymousFlagCount from Drupal\Tests\flag\Kernel
    1x in FlagCountsTest::testFlagCounts from Drupal\Tests\flag\Kernel
    1x in FlagServiceTest::testGlobalFlaggingRetrieval from Drupal\Tests\flag\Kernel
    1x in FlagServiceTest::testFlagServiceGetFlaggingUsers from Drupal\Tests\flag\Kernel
    1x in FlagServiceTest::testFlagServiceGetFlag from Drupal\Tests\flag\Kernel
    1x in KernelTestSuite::suite from Drupal\Tests\TestSuites
    1x in AccessTest::testUserFlag from Drupal\Tests\flag\Kernel
    1x in AccessTest::testOwnersAccess from Drupal\Tests\flag\Kernel
    1x in AccessTest::testDefault from Drupal\Tests\flag\Kernel
    1x in FlaggingStorageTest::testCacheReset from Drupal\Tests\flag\Kernel
    1x in FlagActionTest::testFlaggingDeleteAction from Drupal\Tests\flag\Kernel
    1x in FlagActionTest::testFlagActions from Drupal\Tests\flag\Kernel
    1x in FlagActionTest::testFlagActionsCreation from Drupal\Tests\flag\Kernel
    1x in FlagCountsTest::testUserDeletion from Drupal\Tests\flag\Kernel

  6x: The Drupal\FunctionalJavascriptTests\JavascriptTestBase is deprecated in Drupal 8.5.x and will be removed before Drupal 9.0.0. Instead, use Drupal\FunctionalJavascriptTests\WebDriverTestBase. See https://www.drupal.org/node/2945059
    1x in FunctionalTestSuite::suite from Drupal\Tests\TestSuites
    1x in FlagContextualLinksTest::testFlagLinks from Drupal\Tests\flag\FunctionalJavascript
    1x in LinkTypeAjaxTest::testAjaxLink from Drupal\Tests\flag\FunctionalJavascript
    1x in ModalFormTest::testModalOption from Drupal\Tests\flag\FunctionalJavascript
    1x in FlagCountExtensionTest::testUi from Drupal\Tests\flag\FunctionalJavascript
    1x in AjaxLinkTest::testDomUpdate from Drupal\Tests\flag\FunctionalJavascript

  2x: Drupal\simpletest\ContentTypeCreationTrait is deprecated in Drupal 8.4.x. Will be removed before Drupal 9.0.0. Use \Drupal\Tests\node\Traits\ContentTypeCreationTrait instead. See https://www.drupal.org/node/2884454.
    1x in KernelTestSuite::suite from Drupal\Tests\TestSuites
    1x in FlaggingStorageTest::testCacheReset from Drupal\Tests\flag\Kernel

  2x: Drupal\simpletest\NodeCreationTrait is deprecated in Drupal 8.4.x. Will be removed before Drupal 9.0.0. Use \Drupal\Tests\node\Traits\NodeCreationTrait instead. See https://www.drupal.org/node/2884454.
    1x in KernelTestSuite::suite from Drupal\Tests\TestSuites
    1x in FlaggingStorageTest::testCacheReset from Drupal\Tests\flag\Kernel

  1x: Drupal\serialization\Normalizer\TimeStampItemNormalizerTrait is deprecated in Drupal 8.7.0 and will be removed in Drupal 9.0.0. Use \Drupal\serialization\Normalizer\TimestampNormalizer instead.
    1x in UnitTestSuite::suite from Drupal\Tests\TestSuites

๐Ÿ“Œ Task
Status

Needs work

Version

4.0

Component

Flag core

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom martin107

Live updates comments and jobs are added and updated live.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024