Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
14 Dec 2012 at 15:06 UTC
Updated:
29 Jul 2014 at 21:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
damiankloip commentedHere is a patch to kick things off.
Comment #2
damiankloip commentedConverted the tests to ViewUnitTestBase and added another test (from @todo of last patch) for checking the usesPager() method.
Comment #3
dawehnercool!
As a follow up we might want getUseAjax but sure this is out of scope here.
We could document in the assertion message that the test_executable_displays view has the none pager documented.
What about using random integers?
That's not true, it should be TRUE ;)
Tim patched in another issue to protected
Shouldn't we use format_string instead (not sure).
Comment #4
damiankloip commentedThanks dawehner!
Do you know which patch? Do you think I should revert this one then? Seems weird in a cleanup of this file thought :)
I'm not sure about exactly when to use the format_string() method. I like going with a normal string as it's one less function call, and every little helps.
Sure, we should create a follow up to add the getUseAJAX method.
Comment #5
damiankloip commentedRemoved the @todo I todoed already and added the format_string().
Comment #6
damiankloip commentedSorry, going mad, with the format_string change too.
Comment #7
damiankloip commentedI created a follow up here for the getter: #1866910: Add an ajaxEnabled() method for ViewExecutable
Comment #8
damiankloip commentedIt's also worth noting, switching this to use ViewUnitTestBase cut the test time from ~45 secs to ~13 secs. Not bad!
Comment #9
damiankloip commentedAdded some more tests for initQuery, get/setResponse, generateItemId, getPath, getUrl, get/setTitle methods.
Comment #10
dawehnerGreat work!
any reason to use randomString and not randomName? randomString is a great source for potential random test failures, but yeah actually for paths it shouldn't be different.
Any special reason to use randomString(10) and not randomString()?
Comment #11
damiankloip commentedYep, makes sense. I have changed those. I think that is the actual calls you meant?
Comment #12
tim.plunkett+1!
Missing trailing comma
Otherwise, looks great!
Comment #13
damiankloip commentedNice, thanks for the review!
Rerolled against HEAD and added that trailing comma.
Comment #14
tim.plunkettRTBC when green!
Comment #15
damiankloip commentedI think we are good to go then :)
Comment #16
tim.plunkett#13: 1866804-13.patch queued for re-testing.
Comment #17
webchickYay test coverage!
Committed and pushed to 8.x. Thanks!