All unit tests are in PHPUnit now.

Simpletest UnitTestBase tests (1) have never been isolated enough, (2) were primarily used by Drupal core, and (3) are converted into much more sophisticated PHPUnit tests.

  1. Remove the UnitTestBase class.
  2. Adjust the (Simpletest) KernelTestBase accordingly (moving a few lines from setUp() + derive from TestBase instead).

Comments

berdir’s picture

Status: Postponed » Active

This is unblocked now.

tim.plunkett’s picture

Status: Active » Needs review
StatusFileSize
new3.82 KB

Status: Needs review » Needs work

The last submitted patch, 2: 2324789-unittestbase-2.patch, failed testing.

tim.plunkett’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new1.01 KB
new4.37 KB

TestBase::setUp is abstract, you can't call parent::

berdir’s picture

Status: Needs review » Reviewed & tested by the community

Great.

We need to update https://www.drupal.org/node/1829160 when this is done, possibly some others too, as well as documentation (examples.module...)

catch’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs change record updates

Committed/pushed to 8.0.x, thanks!

  • catch committed 7fc47f3 on 8.0.x
    Issue #2324789 by tim.plunkett: Remove UnitTestBase.
    
catch’s picture

Title: Remove UnitTestBase » [Change record update] Remove UnitTestBase
Status: Needs work » Active
berdir’s picture

Title: [Change record update] Remove UnitTestBase » Remove UnitTestBase
Status: Active » Fixed
Issue tags: -Needs change record updates

There was actually nothing relevant to update there, just added a note that it no longer exists in Drupal 8.

Also searched for UnitTestBase in change records and updated a few (mostly DrupalUnitTestBase left-overs or related change records, actually).

Status: Fixed » Closed (fixed)

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