Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Aug 2013 at 17:38 UTC
Updated:
29 Jul 2014 at 22:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehner.
Comment #2
oadaeh commentedHere's my first stab at correcting this. I get the desired results, I'm just not 100% positive it's the correct way to do it.
Comment #3
oadaeh commentedForgot the Status update.
Comment #4
dawehnerThanks for fixing that bug!
This should be {@inheritdoc}
It would be also cool to have some sort of test for it (personally a unit test would be the test thing).
Comment #5
damiankloip commented@oadaeh, here is a start on the tests, I've just added the first assert for the '@label' token.
This line also needed fixing in the render() method, this is why having test coverage is a good idea. This has been broken for a long time!
Comment #6
dawehnerCan I hazza unit test, plz?
Comment #7
damiankloip commentedok ok, here is the same patch as #5 but for phpunit instead. I've just added the same assertion for the @label token.
And yes, the interdiff is bigger than the patch :)
Comment #8
dawehnerJust to be sure, we should test the get_total_rows setting, not just the @label.
Comment #9
damiankloip commentedYes, the intention was to test all of them.
I think this makes sense to switch to using a data provider too.
Comment #10
dawehnerPlease try to run the test individually ... there is a check_plain() call in the code.
This piece of the code is not executed at all, so it has to be tested.
Additional the actual bug in this issue has to be tested as well.
Comment #11
damiankloip commentedThanks, this class should be pretty well tested now, as the items per page are also passed in from the data provider.
Also, testing the actual bug in this issue is a great idea! Lets do that ;)
So bootstrap.inc is included for unit tests? meh.
Comment #12
damiankloip commentedI should not call destroy; it calls viewsHandlerTypes, which in turn uses t() all over the place.
Comment #13
dawehnerThere are a few lines which are not 100% tested but this already is so much of a progress!
Do we really need an actual viewExecutable or can we just mock it?
Comment #14
dawehnerMh we can't as we still have directly access to all this properties.
The constant is needed to order to run it properly (just this class instead of the full phpunit test suite).
Comment #15
jibranWe can ignore these issue it is pretty much RTBC for me.
Sorting order.
issues id would be nice.
Comment #16
damiankloip commented#2067017: Remove usage of DRUPAL_CORE_COMPATIBILITY/VERSION constants is the DRUPAL_CORE_COMPATIBILITY issue
Comment #17
damiankloip commentedThat got committed already.
jibran, I think that takes care of your comments now?
Comment #18
jibranThank you @damiankloip for great work.
Comment #19
alexpottCommitted 8ebd5dc and pushed to 8.x. Thanks!