Problem/Motivation

The \Drupal\Tests\views\Functional\Handler\HandlerTest::assertEqualValue() documents that argument $handler is of \Drupal\views\Plugin\views\ViewsHandlerInterface but function definition is wrong

Proposed resolution

Fix by changing docblock to point that object expected but would be great to add assertion about type of passed in $handler

Remaining tasks

- agree on implementation
- patch/commit

User interface changes

no

API changes

TBD

Data model changes

no

Release notes snippet

no

Comments

Hardik_Patel_12 created an issue. See original summary.

hardik_patel_12’s picture

StatusFileSize
new839 bytes

Kindly review a patch

hardik_patel_12’s picture

Assigned: hardik_patel_12 » Unassigned
Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: 3105995-2.patch, failed testing. View results

hardik_patel_12’s picture

StatusFileSize
new1.03 KB
new441 bytes

Kindly review a new patch.

hardik_patel_12’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: 3105995-5.patch, failed testing. View results

dhirendra.mishra’s picture

Assigned: Unassigned » dhirendra.mishra
dhirendra.mishra’s picture

Assigned: dhirendra.mishra » Unassigned
Status: Needs work » Needs review
StatusFileSize
new469 bytes
new1.21 KB

class was missing implementing interface. Just fixed that in this patch.

Status: Needs review » Needs work

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

sja112’s picture

Version: 9.0.x-dev » 9.1.x-dev
Assigned: Unassigned » sja112
sja112’s picture

Status: Needs work » Needs review

Patch updated.

sja112’s picture

StatusFileSize
new5.14 KB

Status: Needs review » Needs work

The last submitted patch, 13: 3105995-12.patch, failed testing. View results

sja112’s picture

Status: Needs work » Needs review
StatusFileSize
new4.1 KB

Updated the last submitted patch.

Type hint "\Drupal\views\Plugin\views\ViewsHandlerInterface" missing for $handler. This is not correct as $handler is a stdClass object containing the value and operator properties. There is a "breakString" method in the "ViewsHandlerInterface" which is used to break x,y,z, and x+y+z into an array and $handler object is the result of this method.

Updated the code accordingly. Please review.

sja112’s picture

Assigned: sja112 » Unassigned
hardik_patel_12’s picture

@sja112 thankyou for the patch , but it would great if you provide interdiff also along with the patches. This will help others to track what exactly progress is going on the issue.

sja112’s picture

StatusFileSize
new4.57 KB

Adding interdiff file.

andypost’s picture

Issue summary: View changes
StatusFileSize
new1.05 KB

Added summary, I bet the issue is to add interface for assert, let's see this scope (how many tests will fail)

Probably we can't change argument but

andypost’s picture

Status: Needs review » Needs work

The last submitted patch, 19: 3105995-19.patch, failed testing. View results

pavnish’s picture

Assigned: Unassigned » pavnish

Working on it

pavnish’s picture

Status: Needs work » Needs review
StatusFileSize
new654 bytes
new4.16 KB

@andypost could you please review this patch .

pavnish’s picture

Assigned: pavnish » Unassigned
lendude’s picture

The scope here has become very unclear. This could do with a title and IS update to make it clearer what we are trying to fix, a lot of unrelated clean up seems to have snuck into the patch

Status: Needs review » Needs work

The last submitted patch, 23: 3105995-23.patch, failed testing. View results

pavnish’s picture

Sorry the changes #23 is not working

kishor_kolekar’s picture

I agree with @sja112

 $handler = HandlerBase::breakString('word1 word2+word');

its returning object of Drupal\Tests\views\Functional\Handler\HandlerTest
so its good to remove @param \Drupal\views\Plugin\views\ViewsHandlerInterface $handler from protected function assertEqualValue

andypost’s picture

@kishor_kolekar that's why assert should use interface

andypost’s picture

Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs issue summary update
StatusFileSize
new1.89 KB
new1.53 KB

Updated doc block and added ref to interface that defines result of handler

Added extra assertions for it,

@pavnish the problem with your patch is a lot of unrelated changes when issue exactly about doc block, please check the guide to clarify https://www.drupal.org/core/scope#creep

PS: interdiff from #19, fixed IS

pavnish’s picture

@andypost I agree with your comment .

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Needs review » Closed (outdated)

This has become outdated. The method for which the documentation is being updated was removed in #3231781: [D9.3 beta - w/c Nov 8, 2021] Remove remaining uses of t() in tests

Thanks!