See #2735005: Convert all Simpletest web tests to BrowserTestBase (or UnitTestBase/KernelTestBase)

Scope

EmailFieldTest
EntityReferenceAdminTest
EntityReferenceFileUploadTest
FieldUITest
HandlerFieldFieldTest
FieldDefaultValueCallbackTest
FieldImportDeleteUninstallUiTest
FormTest
reEnableModuleFieldTest

Out of scope

Comments

michielnugter created an issue. See original summary.

michielnugter’s picture

Status: Active » Postponed
michielnugter’s picture

Component: phpunit » field system
Issue tags: +phpunit initiative

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

jonathan1055’s picture

Issue summary: View changes

#2809483: Convert AJAX part of \Drupal\field\Tests\FormTest::testFieldFormJSAddMore to JavascriptTestBase has landed, so I have removed it 'postponed on' in the issue summary.

Does this issue still need the other 5 issues to be completed before it can be un-postponed? 2809483 was listed as the sole blocker on #2735005: Convert all Simpletest web tests to BrowserTestBase (or UnitTestBase/KernelTestBase)

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

nlisgo’s picture

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

ApacheEx’s picture

Issue summary: View changes

only 1 test left to go

lendude’s picture

Issue summary: View changes
Status: Postponed » Active

Lets not postpone this, lets just put that last test out of scope.

lendude’s picture

Status: Active » Needs review
StatusFileSize
new11.2 KB

Just some initial moves, added a CR for the deprecation.

We need to figure out what we want to do with \Drupal\field\Tests\EntityReference\EntityReferenceTestTrait, it's used in a lot of places, so lets not move it in this issue at least.

Status: Needs review » Needs work

The last submitted patch, 14: 2870444-14.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

lendude’s picture

Status: Needs work » Needs review
StatusFileSize
new11.97 KB
new16.83 KB

This should clean up some fails.

borisson_’s picture

Status: Needs review » Needs work

I found one nitpick.

+++ b/core/modules/field/src/Tests/Views/FieldTestBase.php
@@ -17,6 +19,11 @@
+ * @deprecated in Drupal 8.7.0. Will be removed before Drupal 9.0.0. U  se
+ * \Drupal\Tests\field\Functional\Views\FieldTestBase instead.

There seems to be 2 spaces in the word Use here.

lendude’s picture

Status: Needs work » Needs review
StatusFileSize
new16.83 KB
new631 bytes

@borisson_ thanks for reviewing! Fixed the nit.

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Woo!

alexpott’s picture

Version: 8.7.x-dev » 8.6.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 1950bd5f06 to 8.7.x and 9a7661ff23 to 8.6.x. Thanks!

diff --git a/core/modules/field/src/Tests/Views/FieldTestBase.php b/core/modules/field/src/Tests/Views/FieldTestBase.php
index edcd5299b2..6ae3b65546 100644
--- a/core/modules/field/src/Tests/Views/FieldTestBase.php
+++ b/core/modules/field/src/Tests/Views/FieldTestBase.php
@@ -2,7 +2,7 @@
 
 namespace Drupal\field\Tests\Views;
 
-@trigger_error( __NAMESPACE__ . '\FieldTestBase is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\field\Functional\Views\FieldTestBase. See https://www.drupal.org/node/2971931.', E_USER_DEPRECATED);
+@trigger_error(__NAMESPACE__ . '\FieldTestBase is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\field\Functional\Views\FieldTestBase. See https://www.drupal.org/node/2971931.', E_USER_DEPRECATED);
 
 use Drupal\field\Entity\FieldConfig;
 use Drupal\node\Entity\NodeType;
@@ -20,7 +20,7 @@
  *   - Use relationships between different entity types, for example node and
  *     the node author(user).
  *
- * @deprecated in Drupal 8.7.0. Will be removed before Drupal 9.0.0. Use
+ * @deprecated in Drupal 8.6.0. Will be removed before Drupal 9.0.0. Use
  * \Drupal\Tests\field\Functional\Views\FieldTestBase instead.
  *
  * @see https://www.drupal.org/node/2989020

Backported to 8.6.x to keep the tests aligned. And this is a test only change :) Also fixed

FILE: .../dev/drupal/core/modules/field/src/Tests/Views/FieldTestBase.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 5 | ERROR | [x] There should be no white space after an opening "("
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

  • alexpott committed 1950bd5 on 8.7.x
    Issue #2870444 by Lendude, michielnugter, jonathan1055, borisson_:...

  • alexpott committed 9a7661f on 8.6.x
    Issue #2870444 by Lendude, michielnugter, jonathan1055, borisson_:...

Status: Fixed » Closed (fixed)

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