Problem/Motivation

It is confusing to have a test base class which says its unit test but its actually not.

Proposed resolution

Rename ViewUnitTestBase to ViewKernelTestBase

Remaining tasks

-

User interface changes

-

API changes

-

Data model changes

-

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lauriii created an issue. See original summary.

lauriii’s picture

Title: Renme ViewUnitTestBase to ViewKernelTestBase » Rename ViewUnitTestBase to ViewKernelTestBase
Status: Active » Needs review
FileSize
59.04 KB

Status: Needs review » Needs work

The last submitted patch, 2: renme_viewunittestbase-2546416-2.patch, failed testing.

lauriii’s picture

Status: Needs work » Needs review
FileSize
58.87 KB

Removed the .swp

Status: Needs review » Needs work

The last submitted patch, 4: rename_viewunittestbase-2546416-4.patch, failed testing.

borisson_’s picture

Attached patch should resolve at least part of the issues.

Status: Needs review » Needs work

The last submitted patch, 6: rename_viewunittestbase-2546416-6.patch, failed testing.

borisson_’s picture

Status: Needs work » Needs review

Renames WizardPluginBaseUnitTest and DisplayUnitTest files to KernelTest, the classes changed so the filenames should change as well.

borisson_’s picture

Forgot to add the patch / interdiff. Attached now.

Status: Needs review » Needs work

The last submitted patch, 9: rename_viewunittestbase-2546416-8.patch, failed testing.

borisson_’s picture

Status: Needs work » Needs review
FileSize
51 KB
283 bytes

FieldUnitTest class was renamed to FieldKernelTest, this renames the file as well.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Looks great!

+++ b/core/modules/user/src/Tests/Views/HandlerFilterPermissionTest.php
@@ -8,7 +8,7 @@
-use Drupal\user\Tests\Views\UserUnitTestBase;
+use Drupal\user\Tests\Views\UserKernelTestBase;

+++ b/core/modules/user/src/Tests/Views/HandlerFilterRolesTest.php
@@ -8,7 +8,7 @@
-use Drupal\user\Tests\Views\UserUnitTestBase;
+use Drupal\user\Tests\Views\UserKernelTestBase;
 use Drupal\views\Entity\View;
 use Drupal\views\Views;
 
@@ -19,7 +19,7 @@

Feel free to remove this not needed line

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Test only change and therefore permitted in beta. Committed 3d73a39 and pushed to 8.0.x. Thanks!

diff --git a/core/modules/user/src/Tests/Views/HandlerFilterPermissionTest.php b/core/modules/user/src/Tests/Views/HandlerFilterPermissionTest.php
index 6e0eca9..5ea1b0f 100644
--- a/core/modules/user/src/Tests/Views/HandlerFilterPermissionTest.php
+++ b/core/modules/user/src/Tests/Views/HandlerFilterPermissionTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\user\Tests\Views;
 
 use Drupal\Component\Utility\SafeMarkup;
-use Drupal\user\Tests\Views\UserKernelTestBase;
 use Drupal\views\Views;
 
 /**
diff --git a/core/modules/user/src/Tests/Views/HandlerFilterRolesTest.php b/core/modules/user/src/Tests/Views/HandlerFilterRolesTest.php
index 993ba46..3268eec 100644
--- a/core/modules/user/src/Tests/Views/HandlerFilterRolesTest.php
+++ b/core/modules/user/src/Tests/Views/HandlerFilterRolesTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\user\Tests\Views;
 
 use Drupal\user\Entity\Role;
-use Drupal\user\Tests\Views\UserKernelTestBase;
 use Drupal\views\Entity\View;
 use Drupal\views\Views;
 
diff --git a/core/modules/views/src/Tests/ViewTestBase.php b/core/modules/views/src/Tests/ViewTestBase.php
index c814ab6..ae67dcf 100644
--- a/core/modules/views/src/Tests/ViewTestBase.php
+++ b/core/modules/views/src/Tests/ViewTestBase.php
@@ -18,7 +18,7 @@
  * When possible, ViewKernelTestBase should be used instead. Both base classes
  * include the same methods.
  *
- * @see \Drupal\views\Tests\ViewUnitTestBase
+ * @see \Drupal\views\Tests\ViewKernelTestBase
  * @see \Drupal\simpletest\WebTestBase
  */
 abstract class ViewTestBase extends WebTestBase {
diff --git a/core/modules/views/src/Tests/ViewTestData.php b/core/modules/views/src/Tests/ViewTestData.php
index 34fcd44..536470c 100644
--- a/core/modules/views/src/Tests/ViewTestData.php
+++ b/core/modules/views/src/Tests/ViewTestData.php
@@ -14,7 +14,7 @@
  *
  * The methods will be used by both views test base classes.
  *
- * @see \Drupal\views\Tests\ViewUnitTestBase.
+ * @see \Drupal\views\Tests\ViewKernelTestBase.
  * @see \Drupal\views\Tests\ViewTestBase.
  */
 class ViewTestData {

Fixed on commit.

  • alexpott committed 3d73a39 on 8.0.x
    Issue #2546416 by borisson_, lauriii: Rename ViewUnitTestBase to...
jibran’s picture

Should we rename EntityUnitTestBase to EntityKernelTestBase as well?

Status: Fixed » Closed (fixed)

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