This is a follow up to (in reverse order) #3059332: Mark kernel tests that perform no assertions as risky, #2553655: Convert ViewKernelTestBase to use KernelTestBaseTNG, and #1872876: Turn role permission assignments into configuration.
Problem/Motivation
Drupal\Tests\views\Kernel\Handler\FieldCounterTest has this code which will be removed by #3059332: Mark kernel tests that perform no assertions as risky:
/**
* @todo: Write tests for pager.
*/
public function testPager() {
}
Proposed resolution
Do the @todo.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 3063179-11.patch | 3.23 KB | shubham.prakash |
| #10 | 3063179-10.patch | 3.22 KB | shubham.prakash |
| #4 | 3063179-4.patch | 3.22 KB | lendude |
Comments
Comment #2
lendudeHere we go....
Comment #3
daffie commentedHi @lendude, your tests looks good. But I am missing some testing for when the counter_start is used and for when the pager is set to not use the pager's count. Would you like to add those things to the test? If not then the patch is RTBC for me.
Comment #4
lendude@daffie thanks for the review! You are absolutely right, we should add coverage for the counter_start option too, so here we go.
Needed a reroll so no interdiff.
Comment #5
daffie commented@lendude: The added testing is RTBC for me. I have just one question left. In the counter handler that we now are testing for there is a piece of code and I am not sure if we need to add testing for it. What do you think lendude?
Comment #6
lendudeIsn't the entire new test method dedicated to that line? The idea was to add coverage for the counter field when using a pager, which is what we are doing here right?
Or am I overlooking something?
Comment #7
daffie commentedok, then it is RTBC for me.
Comment #8
catchNeeds a re-roll after #3063180: REST views: View result counter shows {{counter}} placeholder when using "data_field" row plugin.
Comment #9
daffie commentedAdd the tag.
Comment #10
shubham.prakash commentedHere is the patch.
Comment #11
shubham.prakash commentedThis patch should fix the issue.
Comment #12
daffie commented@Shubham Prakash: Could you post an interdiff.txt file? See: https://www.drupal.org/documentation/git/interdiff
Comment #13
daffie commented@Shubham Prakash: Forget about the interdiff.txt file. Thank you for the reroll.
Back to RTBC.
Comment #14
larowlanComment #15
larowlanCommitted ece5db4 and pushed to 8.8.x. Thanks!