The filter module uses test class members with underscored names. Some examples are big_user, web_user and admin_user, but there could be others. According to our coding conventions, these should be renamed to bigUser, webUser and adminUser. In addition, some properties are undefined but should be.

See the parent issue #1811638: [meta] Clean-up Test members - ensure property definition and use of camelCase naming convention.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task, because this is a coding standards change.
Issue priority Not critical because coding standard changes are not critical.
Unfrozen changes Unfrozen because it only changes automated tests.
Disruption There is no disruption expected from this sort of change.

Comments

tibbsa’s picture

Status: Needs review » Active
hussainweb’s picture

Component: field system » filter.module
Status: Active » Needs review
StatusFileSize
new23.55 KB

Status: Needs review » Needs work

The last submitted patch, 2: clean_up_filter_module-2394421-2.patch, failed testing.

Status: Needs work » Needs review
mile23’s picture

Status: Needs review » Reviewed & tested by the community

phpcs says there aren't any camel case errors in the test classes.

There are a bunch of out-of-scope array declaration changes.

But moving forward, RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/filter/src/Tests/FilterAdminTest.php
@@ -21,7 +21,21 @@ class FilterAdminTest extends WebTestBase {
-  public static $modules = array('filter', 'node');
+  public static $modules = ['filter', 'node'];

@@ -29,7 +43,7 @@ class FilterAdminTest extends WebTestBase {
-    $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+    $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']);

@@ -71,25 +85,25 @@ protected function setUp() {
-    $full_html_format = entity_create('filter_format', array(
+    $full_html_format = entity_create('filter_format', [
       'format' => 'full_html',
       'name' => 'Full HTML',
       'weight' => 1,
-      'filters' => array(),
-    ));
+      'filters' => [],
+    ]);

Out of scope... all of the changes to php's new array format on lines that do not need to be changed are completely out of scope for this issue.... there must be more in the issue. Please keep the issue in scope.

hussainweb’s picture

Status: Needs work » Needs review
StatusFileSize
new6.9 KB
new21.7 KB

Reverting all changes with new array syntax.

mile23’s picture

Status: Needs review » Reviewed & tested by the community

Fixes all the camelCase errors, and doesn't have out of scope [] arrays.

Thanks again, @hussainweb. :-)

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed b1f378f and pushed to 8.0.x. Thanks!

  • alexpott committed b1f378f on 8.0.x
    Issue #2394421 by hussainweb: Clean-up filter module test members -...

Status: Fixed » Closed (fixed)

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