Problem/Motivation

When running test, ParagraphsTypeHasEnabledBehaviorPluginTest. ::setUp should have a void return typehint.

Steps to reproduce

Proposed resolution

Adding a void typehint to ::setUp.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

taniachque created an issue. See original summary.

taniachque’s picture

Status: Needs work » Needs review
FileSize
2.26 KB
Berdir’s picture

Status: Needs review » Needs work
+++ b/tests/src/Kernel/ParagraphsBehaviorPluginsTest.php
@@ -31,7 +31,7 @@ class ParagraphsBehaviorPluginsTest extends KernelTestBase {
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp():void {
     parent::setUp();

Looking are core, the coding standard is to add a space between : and void.

mrinalini9’s picture

Status: Needs work » Needs review
FileSize
2.26 KB

Updated patch #2 by adding space between : and void, please review it.

hmendes’s picture

Shouldn't we fix all occurrences of setIp in the tests?
Adding a new patch.

hmendes’s picture

Forgot to fix the submodules tests.

taniachque’s picture

Assigned: Unassigned » taniachque
FileSize
1.9 KB
2.27 KB

Thank you so much for the patches, I will fix the remaining notices.
I have this old patch that I wanted to upload.

mathilde_dumond’s picture

Assigned: taniachque » Unassigned
Berdir’s picture

Status: Needs review » Fixed

Thanks, committed. This will likely break tests in modules that extend from paragraphs (base) test classes, paragraphs_collection for example will likely be affected.

  • Berdir committed 203ecf8 on 8.x-1.x authored by hmendes
    Issue #3228098 by taniachque, hmendes, mrinalini9: ::setUp should have...

Status: Fixed » Closed (fixed)

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