There is code in that test that is not running, it is hasn't been running since 2013. We should either fix or remove that code.
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | 2947588-21.patch | 5.67 KB | shaktik |
| #17 | 2947588-17.patch | 5.66 KB | mrinalini9 |
There is code in that test that is not running, it is hasn't been running since 2013. We should either fix or remove that code.
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | 2947588-21.patch | 5.67 KB | shaktik |
| #17 | 2947588-17.patch | 5.66 KB | mrinalini9 |
Comments
Comment #2
borisson_This is one options, just removing the code.
Comment #3
borisson_This was discovered in #2937844: Fix 'Squiz.PHP.NonExecutableCode' coding standard. Should this be in the phpunit component?
Comment #4
idebr commentedThe debug function was removed in #2212081: Remove views optional handler handling, so it is safe to assume this code is no longer needed.
Comment #5
alexpottWell it was commented out in #1822048: Introduce a generic fallback plugin mechanism.
It'd be great to get a +1 from a sub system maintainer. I think this is the right thing to do after reading #2212081: Remove views optional handler handling.
Comment #7
MixologicTestbot Snafu.
Comment #8
alexpottStill waiting for the subsystem maintainer review.
Comment #10
joachim commentedThese tests should be in, because they test the 'Broken/Missing handler' UI text that you get when there's a problem.
So what we should do here, I think, is try removing the return, see what happens. I suspect the text the test is checking for will need tweaking, as BrokenHandlerTrait doesn't quite have the same text.
Comment #11
andypostNew patch with different approach - refactoring of test code
- added testing of messages from
\Drupal\views\Plugin\views\BrokenHandlerTraitcos there's no actual testing of the trait and #2212081-24: Remove views optional handler handling tells about it- extended tests for broken handler for both cases - when table is broken and when field is broken
Not sure it needs subsytem maintainer review
Comment #15
daffie commentedThe does not apply for 9.1, therefore a reroll is needed.
Comment #16
mrinalini9 commentedComment #17
mrinalini9 commentedRerolled patch for 9.1.x, please review.
Comment #19
ravi.shankar commentedSetting it to NR and removing needs reroll tage.
Comment #20
daffie commentedThe reroll looks good, just one nitpick:
The empty line before the class statement needs to go.
Comment #21
mrinalini9 commentedComment #22
mrinalini9 commentedUpdated patch as per the changes mentioned in #20, please review.
Comment #23
shaktikHi @daffie,
Just removed empty line before the class statement, Thanks for the review.
Comment #24
shaktikHi @mrinalini9,
apologize for the inconvenience patch IS not updated one day, that why I picked and updated.
Comment #25
mrinalini9 commentedHi @shaktik,
I have already rerolled patch in #17, and also today, I am able to apply the same patch after taking the latest pull from the branch. So I don't think any update was needed. Can you please add interdiff file here.
Thanks
Comment #26
daffie commented@mrinalini9: thank you for the patch.
@shaktik: Please post an interdiff.txt with your patch.
Comment #27
shaktikHi @daffie, @mrinalini9,
below the interdiff as feedback on #20.
Comment #28
mrinalini9 commentedHi @shaktik,
I have already done these changes in #22 and I think both #22 and #23 are the same patches, I didn't found any differences between them.
Thanks
Comment #29
lendudeThis looks great. No overlap with existing coverage, so refactoring this looks like the better solution then removing it.
The current scope here is just to refactor the old test, but we should probably extend the coverage for this to also include sort and argument:
\Drupal\views\Plugin\views\sort\Broken\Drupal\views\Plugin\views\argument\BrokenBut I'm fine with it if people want to move that to a follow up.
Comment #30
catchComment #31
daffie commentedCreated the requested followup: #3144679: The test \Drupal\Tests\views\Kernel\ModuleTest::testViewsGetHandler() is missing testing for \Drupal\views\Plugin\views\sort\Broken and \Drupal\views\Plugin\views\argument\Broken.
Comment #32
alexpottCommitted and pushed 0c700b50a0 to 9.1.x and bf8bbd989e to 9.0.x and ebbda37025 to 8.9.x. Thanks!
Backported to 8.9.x as a test only change.